[Box Backup-commit] COMMIT r2489 - box/trunk/docs

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Tue Mar 31 20:56:09 BST 2009


Author: chris
Date: 2009-03-31 20:56:09 +0100 (Tue, 31 Mar 2009)
New Revision: 2489

Modified:
   box/trunk/docs/Makefile
Log:
Hopefully fix building and cleaning of bb-man.xsl.


Modified: box/trunk/docs/Makefile
===================================================================
--- box/trunk/docs/Makefile	2009-03-31 19:25:22 UTC (rev 2488)
+++ box/trunk/docs/Makefile	2009-03-31 19:56:09 UTC (rev 2489)
@@ -39,8 +39,10 @@
 $(DOCBOOK_DIR)/ExceptionCodes.xml: ../ExceptionCodes.txt
 	perl tools/generate_except_xml.pl $< $> $@
 
-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 \
 	   DOCBOOK=file:///usr/local/share/xsl/docbook/manpages/docbook.xsl; \
@@ -82,21 +84,32 @@
 $(HTML_DIR)/man-html/%.html: $(DOCBOOK_DIR)/%.xml $(NOCHUNKBOOKXSL)
 	$(DBPROC) -o $@ $(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.
+
 .for MAN_PAGE in $(NROFF_PAGES) :
 $(MAN_DIR)/$(MAN_PAGE).gz: $(DOCBOOK_DIR)/$(MAN_PAGE:R).xml
+	$(MAKE) xslt
 	$(DBPROC) -o $(.TARGET:.gz=) $(MANXSL) $>
 	gzip $(@:.gz=)
 




More information about the Boxbackup-commit mailing list