From ba96802ba13f022047e93dfa96caddf4fff42146 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 21 Aug 2011 17:48:59 +0100 Subject: Create man page --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4ec498d..dbd5753 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ SCRIPTS = getgmissing.sh getgfailed.sh makebookpdf.sh DOC = README COPYING LEGAL BIN = $(SRC:.c=) +MAN = $(SRC:.c=.1) OBJ = $(SRC:.c=.o) $(LIB) all: $(BIN) @@ -30,10 +31,14 @@ util.a: $(LIB) @ranlib $@ install: all + mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(SCRIPTS) $(DESTDIR)$(PREFIX)/bin + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + for f in $(MAN); do sed "s/VERSION/$(VERSION)/g" < $$f > $(DESTDIR)$(MANPREFIX)/man1/$$f; done uninstall: cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN) $(SCRIPTS) + cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN) clean: rm -f -- $(BIN) $(OBJ) util.a index.html -- cgit v1.2.3