summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2018-09-09 21:02:43 +0200
committerLevente Polyak <anthraxx@archlinux.org>2018-09-09 21:02:43 +0200
commit05c81038e5d01962221e5fe2901813dbfba0f864 (patch)
tree968c4f00edf4ffb3c8ef45709bc3d60baa07a8cf /Makefile
parent6364b3c9b9fae2b43bf3e02b9e84c814fc3f502f (diff)
downloaddevtools-05c81038e5d01962221e5fe2901813dbfba0f864.tar.xz
doc: Add lddd man page
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2d29c83..80fe1d7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
V=20180531
PREFIX = /usr/local
+MANDIR = $(PREFIX)/share/man
BINPROGS = \
checkpkg \
@@ -60,7 +61,13 @@ BASHCOMPLETION_LINKS = \
archco \
communityco
-all: $(BINPROGS) bash_completion zsh_completion
+
+MANS = \
+ doc/lddd.1
+
+
+all: $(BINPROGS) bash_completion zsh_completion man
+man: $(MANS)
edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g"
@@ -72,8 +79,13 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g"
@chmod +x "$@"
@bash -O extglob -n "$@"
+$(MANS): doc/asciidoc.conf doc/footer.asciidoc
+
+doc/%: doc/%.asciidoc
+ a2x --no-xmllint --asciidoc-opts="-f doc/asciidoc.conf" -d manpage -f manpage -D doc $<
+
clean:
- rm -f $(BINPROGS) bash_completion zsh_completion
+ rm -f $(BINPROGS) bash_completion zsh_completion $(MANS)
install:
install -dm0755 $(DESTDIR)$(PREFIX)/bin
@@ -88,6 +100,9 @@ install:
for l in ${BASHCOMPLETION_LINKS}; do ln -sf devtools $(DESTDIR)/usr/share/bash-completion/completions/$$l; done
install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco
+ for manfile in $(MANS); do \
+ install -Dm644 $$manfile -t $(DESTDIR)$(MANDIR)/man$${manfile##*.}; \
+ done;
uninstall:
for f in ${BINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
@@ -99,6 +114,9 @@ uninstall:
rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
rm -f $(DESTDIR)$(PREFIX)/bin/communityco
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
+ for manfile in $(MANS); do \
+ rm -f $(DESTDIR)$(MANDIR)/man$${manfile##*.}/$${manfile#doc/}; \
+ done;
dist:
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz