fix man; include built man in repo
This commit is contained in:
20
Makefile
20
Makefile
@@ -7,8 +7,14 @@ ifneq "$(wildcard src/*.h)" ''
|
||||
HEADERS = $(wildcard src/*.h)
|
||||
endif
|
||||
|
||||
ifeq "$(shell id -u)" '0'
|
||||
PREFIX := /usr/local
|
||||
else
|
||||
PREFIX := $(HOME)/.local
|
||||
endif
|
||||
|
||||
define DOCS
|
||||
$(subst docs/, build/man/,
|
||||
$(subst docs/, man/,
|
||||
$(patsubst
|
||||
%.md, %,
|
||||
$(wildcard docs/*.md)
|
||||
@@ -21,17 +27,9 @@ build: build/ build/$(NAME)
|
||||
build/$(NAME): src/main.c $(HEADERS)
|
||||
cc -o $@ $<
|
||||
|
||||
define PREFIX
|
||||
ifeq $(UID) 0
|
||||
/usr/local
|
||||
else
|
||||
$(HOME)/.local
|
||||
endif
|
||||
endef
|
||||
|
||||
install:
|
||||
install -CDm0755 -t $(PREFIX)/bin/ build/$(NAME)
|
||||
install -CDm0644 -t $(PREFIX)/share/man/man1 build/$(NAME)
|
||||
install -CDm0644 -t $(PREFIX)/share/man/man1 man/$(NAME).1
|
||||
|
||||
test:
|
||||
$(error testing using `make' not supported; use `just')
|
||||
@@ -39,7 +37,7 @@ test:
|
||||
docs:
|
||||
make $(strip $(DOCS))
|
||||
|
||||
build/man/%: docs/%.md build/man/ docs/
|
||||
man/%: docs/%.md man/
|
||||
pandoc --to man \
|
||||
--standalone \
|
||||
--output $@ \
|
||||
|
||||
Reference in New Issue
Block a user