path: root/docs
diff options
authorChris Wilson <>2009-03-31 19:56:09 +0000
committerChris Wilson <>2009-03-31 19:56:09 +0000
commit53609de59d9282c3008e1edcbf5f9f4f1e84216e (patch)
tree3a16bc131d1c580dc64f3acf2bccc82a9cae1232 /docs
parent8f178a701a1fccfa9e54a8f11effdfbce125652d (diff)
Hopefully fix building and cleaning of bb-man.xsl.
Diffstat (limited to 'docs')
1 files changed, 19 insertions, 6 deletions
diff --git a/docs/Makefile b/docs/Makefile
index 7276b589..f337fd86 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -39,7 +39,9 @@ $(HTML_DIR)/instguide/index.html: $(BOOKXSL) $(DOCBOOK_DIR)/instguide.xml
$(DOCBOOK_DIR)/ExceptionCodes.xml: ../ExceptionCodes.txt
perl tools/ $< $> $@
-manpages: $(MANXSL) man-dirs man-nroff man-html
+manpages: man-dirs man-nroff man-html
+xslt: $(MANXSL)
$(MANXSL): $(MANXSL).tmpl
@if [ -f /usr/local/share/xsl/docbook/manpages/docbook.xsl ]; then \
@@ -82,21 +84,32 @@ man-html: $(HTML_FILES)
$(HTML_DIR)/man-html/%.html: $(DOCBOOK_DIR)/%.xml $(NOCHUNKBOOKXSL)
+# Before running xsltproc to generate manual pages, we need to check
+# that $(MANXSL) has been built. We don't want to add it to dependencies,
+# because that would cause # the man pages to try to be rebuilt even if
+# they already exist if the date of the xslt file changes, and that
+# requires xsltproc, which negates the point of precompiling them for
+# distribution users.
# GNU make
-$(MAN_DIR)/%.8.gz: $(DOCBOOK_DIR)/%.xml $(MANXSL)
+$(MAN_DIR)/%.8.gz: $(DOCBOOK_DIR)/%.xml
+ $(MAKE) xslt
$(DBPROC) -o $(@:.gz=) $(MANXSL) $<
gzip $(@:.gz=)
# GNU make
-$(MAN_DIR)/%.5.gz: $(DOCBOOK_DIR)/%.xml $(MANXSL)
+$(MAN_DIR)/%.5.gz: $(DOCBOOK_DIR)/%.xml
+ $(MAKE) xslt
$(DBPROC) -o $(@:.gz=) $(MANXSL) $<
gzip $(@:.gz=)
-# BSD make: the final colon (:) is required to make this line valid syntax
-# for a dummy rule in GNU make. It creates a dummy rule in BSD make too.
-# Both dummy rules are harmless.
+# BSD make: the final colon (:) is required to make the .for and .endfor
+# lines valid in GNU make. It creates (different) dummy rules in GNU and
+# BSD make. Both dummy rules are harmless.
+ $(MAKE) xslt
$(DBPROC) -o $(.TARGET:.gz=) $(MANXSL) $>
gzip $(@:.gz=)