summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2011-08-21 17:48:59 +0100
committerNick White <git@njw.me.uk>2011-08-21 17:48:59 +0100
commitba96802ba13f022047e93dfa96caddf4fff42146 (patch)
tree932c4490dc4150879e9d17b2b1783eb5d820d2d1 /Makefile
parent3ee5af0589fab8c0aec7425c3ca6ba3f27a9b35d (diff)
Create man page
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
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