summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 842eb31..e6828f3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,12 @@
-all: git-bz.html git-bz.1
+include Makefile.inc
+
+ifeq ($(enable_documentation),yes)
+docs = git-bz.html git-bz.1
+else
+docs =
+endif
+
+all: $(docs)
%.xml: %.txt
asciidoc -f asciidoc.conf -d manpage -b docbook $<
@@ -16,3 +24,13 @@ upload-html: git-bz.html
clean:
rm -f git-bz.xml git-bz.html git-bz.1
+
+install: install-bin $(if $(findstring yes,$(enable_documentation)),install-doc)
+
+install-bin:
+ mkdir -p $(DESTDIR)$(bindir)
+ install -m 0755 $(srcdir)/git-bz $(DESTDIR)$(bindir)
+
+install-doc:
+ mkdir -p $(DESTDIR)$(mandir)/man1
+ install -m 0644 git-bz.1 $(DESTDIR)$(mandir)/man1