summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-09-24 00:31:48 +0200
committerRichard Braun <rbraun@sceen.net>2017-09-24 00:36:25 +0200
commit500742bcf20b30d9ba32cc7f16f5e19dd4d6eae7 (patch)
tree381b2d0ba1d195f58785e91b2a58c15913f7949f /doc
parentda26ec76f1bb6126debfbb7938df268a1de2900a (diff)
Rework cleaning and installation targets
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile34
1 files changed, 21 insertions, 13 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 2d49dd1..843cbee 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -14,11 +14,13 @@ ASCIIDOC_MANDOCS := $(patsubst %.9.txt,%.9,$(ASCIIDOC_SOURCES))
ASCIIDOC_HTMLDOCS := $(patsubst %.9.txt,%.9.html,$(ASCIIDOC_SOURCES))
define DOC_HELP
- @printf 'Documentation targets:\n'
- @printf ' docs - Build all documentation\n'
- @printf ' mandocs - Build man pages\n'
- @printf ' htmldocs - Build HTML man pages\n'
- @printf '\n'
+ @printf '* mandocs - Build man pages\n'
+ @printf '* htmldocs - Build HTML man pages\n'
+endef
+
+define DOC_INSTALL_HELP
+ @printf ' install-mandocs - Install man pages\n'
+ @printf ' install-htmldocs - Install HTML man pages\n'
endef
# Expose intermediate DocBook files for correct parallel builds.
@@ -50,6 +52,12 @@ endef
%_man_install: doc/%
install -D -m 644 $< $(DESTDIR)$(PREFIX)/$(DATAROOTDIR)/man/man9/$*
+.PHONY: install-mandocs
+install-mandocs: $(mandocs_install_targets)
+
+.PHONY: install-htmldocs
+install-htmldocs: $(htmldocs_install_targets)
+
define htmldocs_install_targets
$(foreach htmlpage,$(notdir $(ASCIIDOC_HTMLDOCS)),$(htmlpage)_html_install)
endef
@@ -57,17 +65,17 @@ endef
%_html_install: doc/%
install -D -m 644 $< $(DESTDIR)$(PREFIX)/$(DATAROOTDIR)/doc/x15/$*
-.PHONY: docs_install
-docs_install: $(mandocs_install_targets) $(htmldocs_install_targets)
+.PHONY: install-docs
+install-docs: install-mandocs install-htmldocs
-define docs_clean
+define clean_docs
$(Q)rm -f $(ASCIIDOC_MANDOCS) \
$(ASCIIDOC_HTMLDOCS)
endef
-.PHONY: docs_clean
-docs_clean:
- $(call docs_clean)
+.PHONY: clean-docs
+clean-docs:
+ $(call clean_docs)
-.PHONY: docs_distclean
-docs_distclean:
+.PHONY: distclean-docs
+distclean-docs: clean-docs