fix man; include built man in repo

This commit is contained in:
2026-01-14 23:16:50 +05:30
parent 7b07cb8bc6
commit 5c90280037
3 changed files with 67 additions and 11 deletions

View File

@@ -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 $@ \