From 81fab3efe439e8dcce790a1fbce68f4ba3056423 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 28 Mar 2003 15:13:33 +0000 Subject: [PATCH] Use the print module to output the XML catalog properly [SVN r18125] --- boostbook.jam | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/boostbook.jam b/boostbook.jam index 93c3ac055..8f95ba9c9 100644 --- a/boostbook.jam +++ b/boostbook.jam @@ -13,6 +13,7 @@ import errors ; import targets ; import feature ; import generators ; +import print ; import property ; import property-set ; import regex ; @@ -166,12 +167,15 @@ rule xml-catalog-action ( target : property-set ? : catalog-entries * ) { self.actualized = true ; local actual = [ $(self.targets[1]).actualize ] ; - local text = "" ; + local text = "" ; - local rewrites ; - + text += "" ; + text += "" ; + # BoostBook DTD catalog entry - rewrites += "" ; + text += " " ; if ! $(self.docbook-xsl-dir) { @@ -185,7 +189,7 @@ rule xml-catalog-action ( target : property-set ? : catalog-entries * ) } else { - rewrites += "" ; + text += " " ; } if ! $(self.docbook-dtd-dir) @@ -200,29 +204,19 @@ rule xml-catalog-action ( target : property-set ? : catalog-entries * ) } else { - rewrites += "" ; + text += " " ; } - REWRITES on $(actual) = $(rewrites) ; - ALWAYS $(actual) ; - boostbook.write-xml-catalog $(actual) ; + text += "" ; + + print.output $(actual) ; + print.text $(text) : true ; } } } class xml-catalog-action : action ; -actions quietly write-xml-catalog -{ - echo "" > $(<) ; - echo "> $(<) ; - echo " PUBLIC \"-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN\"" >> $(<) ; - echo " \"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd\">" >> $(<) ; - echo "" >> $(<) ; - echo "$(REWRITES)" >> $(<) ; - echo "" >> $(<) ; -} - rule boostbook-target-class ( name : project : sources * : requirements * : default-build * : catalog-entries * ) { @@ -324,6 +318,9 @@ actions xslt-xsltproc-dir XML_CATALOG_FILES=catalog.xml xsltproc $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) } +############################################################################# +# Dependency scanners +############################################################################# # XInclude scanner. Mostly stolen from c-scanner :) # Note that this assumes an "xi" prefix for XIncludes. This isn't always the # case for XML documents, but we'll assume it's true for anything we encounter. @@ -358,5 +355,4 @@ rule xinclude-scanner ( includes * ) class xinclude-scanner : scanner ; scanner.register xinclude-scanner ; -type.set-scanner XML : xinclude-scanner ; - +type.set-scanner XML : xinclude-scanner ; \ No newline at end of file