]> granicus.if.org Git - docbook-dsssl/commitdiff
Removed param.xml and param.html targets from stylesheet makefiles
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 19 Oct 2006 07:02:51 +0000 (07:02 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 19 Oct 2006 07:02:51 +0000 (07:02 +0000)
(param.xml is now built by the doc target, and the param.html is
obsolete).

Also, added mechanism for appending terminal newlines to param.xsl
files (because Saxon doesn't newline-terminate its outuput).

xsl/docsrc/fo/.cvsignore
xsl/docsrc/html/.cvsignore
xsl/docsrc/manpages/.cvsignore
xsl/docsrc/wordml/.cvsignore
xsl/fo/Makefile
xsl/html/Makefile
xsl/lib/Makefile
xsl/manpages/Makefile
xsl/tools/xsl/build/addnewline.xsl [new file with mode: 0644]
xsl/tools/xsl/build/identity.xsl [new file with mode: 0644]
xsl/wordml/Makefile

index 6722cd96e785ac093e976a48df83409bf618b0a1..597a43c7d1b5539e117fc6e057205552c15ea4ab 100644 (file)
@@ -1 +1,2 @@
 *.xml
+Makefile.param
index 6722cd96e785ac093e976a48df83409bf618b0a1..597a43c7d1b5539e117fc6e057205552c15ea4ab 100644 (file)
@@ -1 +1,2 @@
 *.xml
+Makefile.param
index 6722cd96e785ac093e976a48df83409bf618b0a1..597a43c7d1b5539e117fc6e057205552c15ea4ab 100644 (file)
@@ -1 +1,2 @@
 *.xml
+Makefile.param
index 6722cd96e785ac093e976a48df83409bf618b0a1..597a43c7d1b5539e117fc6e057205552c15ea4ab 100644 (file)
@@ -1 +1,2 @@
 *.xml
+Makefile.param
index beff554ebed0274531f458415d09682a771bc16a..3b926768da6cf1ea2e02ea9201601f945800dced 100644 (file)
@@ -2,27 +2,22 @@ include ../../cvstools/Makefile.incl
 
 PARAMPROF=.param.profiled
 PARAMSTRIP=.param.stripped
-LREFENTRY=../tools/xsl/build/lrefentry.xsl
 
 include Makefile.param
 
 all: titlepage.templates.xsl param.xsl profile-docbook.xsl
 
-param.html: param.xml
-       $(XSLT) $< $(LREFENTRY) $@
-
-param.xml: param.xweb $(PARAMS)
-       ../../cvstools/paramchk -m Makefile.param $<
-       $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=fo
-       $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
-       $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@
-       $(RM) $(PARAMPROF) $(PARAMSTRIP)
-
 param.xsl: param.xweb $(PARAMS)
        ../../cvstools/paramchk -m Makefile.param $<
        $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=fo
        $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
+ifeq ($(ADDNEWLINE),)
        $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@
+else
+       $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp
+       $(XSLT) $@.tmp $(ADDNEWLINE) $@
+       $(RM) $@.tmp
+endif
        $(RM) $(PARAMPROF) $(PARAMSTRIP)
 
 titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl
@@ -30,12 +25,13 @@ titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl
 
 Makefile.param:
        ../../cvstools/paramchk -m $@ param.xweb
+       $(MAKE)
 
 profile-docbook.xsl: docbook.xsl ../profiling/xsl2profile.xsl
        $(XSLT) $< ../profiling/xsl2profile.xsl $@
 
 clean:
-       $(RM) param.xml param.html param.xsl \
+       $(RM) param.xml \
               profile-docbook.xsl \
               titlepage.templates.xsl
        $(RM) Makefile.param
index fff19a8fd0307e229225931ba181a488254da723..e25269195d8b70846f005f006490ae0d2df57943 100644 (file)
@@ -2,32 +2,23 @@ include ../../cvstools/Makefile.incl
 
 PARAMPROF=.param.profiled
 PARAMSTRIP=.param.stripped
-LREFENTRY=../tools/xsl/build/lrefentry.xsl
 
 include Makefile.param
 
 all: titlepage.templates.xsl param.xsl \
      profile-docbook.xsl profile-chunk-code.xsl
 
-xml: param.xml
-
-html: param.html
-
-param.html: param.xml titlepage.templates.xsl
-       $(XSLT) $< $(LREFENTRY) $@
-
-param.xml: param.xweb $(PARAMS)
-       ../../cvstools/paramchk -m Makefile.param $<
-       $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html
-       $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
-       $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@
-       $(RM) $(PARAMPROF) $(PARAMSTRIP)
-
 param.xsl: param.xweb $(PARAMS)
        ../../cvstools/paramchk -m Makefile.param $<
        $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html
        $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
+ifeq ($(ADDNEWLINE),)
        $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@
+else
+       $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp
+       $(XSLT) $@.tmp $(ADDNEWLINE) $@
+       $(RM) $@.tmp
+endif
        $(RM) $(PARAMPROF) $(PARAMSTRIP)
 
 titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl
@@ -35,7 +26,7 @@ titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl
 
 Makefile.param:
        ../../cvstools/paramchk -m $@ param.xweb
-       make
+       $(MAKE)
 
 profile-docbook.xsl: docbook.xsl ../profiling/xsl2profile.xsl
        $(XSLT) $< ../profiling/xsl2profile.xsl $@
@@ -44,7 +35,7 @@ profile-chunk-code.xsl: chunk-code.xsl ../profiling/xsl2profile.xsl
        $(XSLT) $< ../profiling/xsl2profile.xsl $@
 
 clean:
-       $(RM) param.xml param.html param.xsl \
+       $(RM) param.xsl \
        profile-docbook.xsl profile-chunk-code.xsl \
        titlepage.templates.xsl
        $(RM) Makefile.param
index 9817f06a49843f2a2ca290523fab0eea38a8c522..ea8bab94dc22ac9b7a9dcf60dc2cc141f6552bf5 100644 (file)
@@ -12,13 +12,25 @@ lib.html: lib.xml lib.xsl
 lib.xml: lib.xweb
        $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html
        $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
+ifeq ($(ADDNEWLINE),)
        $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@
+else
+       $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@.tmp
+       $(XSLT) $@.tmp $(ADDNEWLINE) $@
+       $(RM) $@.tmp
+endif
        $(RM) $(PARAMPROF) $(PARAMSTRIP)
 
 lib.xsl: lib.xweb
        $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html
        $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
+ifeq ($(ADDNEWLINE),)
        $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@
+else
+       $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp
+       $(XSLT) $@.tmp $(ADDNEWLINE) $@
+       $(RM) $@.tmp
+endif
        $(RM) $(PARAMPROF) $(PARAMSTRIP)
 
 clean:
index 71c8d241dfb60c71013b276cf3eca3faa185f5f9..3f22ee0e40a49cc9ebe3e5cf1ef62ce2313c5cf8 100644 (file)
@@ -3,32 +3,11 @@ include ../../cvstools/Makefile.incl
 PARAMPROF=.param.profiled
 PARAMSTRIP=.param.stripped
 HTML2ROFF=../tools/xsl/build/html2roff.xsl
-LREFENTRY=../tools/xsl/build/lrefentry.xsl
 
 include Makefile.param
 
 all: param.xsl html-synop.xsl
 
-xml: param.xml
-
-html: param.html
-
-param.html: param.xml
-       $(XSLT) $< $(LREFENTRY) $@
-
-param.xml: param.xweb $(PARAMS)
-       ../../cvstools/paramchk -m Makefile.param $<
-       $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html
-       $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
-ifeq ($(ADDNEWLINE),)
-       $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@
-else
-       $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@.tmp
-       $(XSLT) $@.tmp $(ADDNEWLINE) $@
-       $(RM) $@.tmp
-endif
-       $(RM) $(PARAMPROF) $(PARAMSTRIP)
-
 param.xsl: param.xweb $(PARAMS)
        ../../cvstools/paramchk -m Makefile.param $<
        $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html
@@ -44,7 +23,7 @@ endif
 
 Makefile.param:
        ../../cvstools/paramchk -m $@ param.xweb
-       make
+       $(MAKE)
 
 html-synop.xsl: ../html/synop.xsl
        $(XSLT) $< $(HTML2ROFF) $@
diff --git a/xsl/tools/xsl/build/addnewline.xsl b/xsl/tools/xsl/build/addnewline.xsl
new file mode 100644 (file)
index 0000000..0cf2e38
--- /dev/null
@@ -0,0 +1,13 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               version='1.0'>
+  <xsl:import href="./identity.xsl"/>
+
+  <xsl:output method="xml"
+             indent="no"/>
+  
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+    <xsl:text>&#x0a;</xsl:text>
+  </xsl:template>
+  
+</xsl:stylesheet>
diff --git a/xsl/tools/xsl/build/identity.xsl b/xsl/tools/xsl/build/identity.xsl
new file mode 100644 (file)
index 0000000..474ac97
--- /dev/null
@@ -0,0 +1,13 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               version='1.0'>
+
+  <xsl:output method="xml"
+             indent="no"/>
+  
+  <xsl:template match="node() | @*">
+    <xsl:copy>
+      <xsl:apply-templates select="@* | node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+</xsl:stylesheet>
index 76c64c48243c3bab677b2865d3598e29ed56d770..674ee036011920c2600beefc5fee6e29d644e560 100644 (file)
@@ -5,7 +5,6 @@ STYLESHEETDIR = .
 
 PARAMPROF=.param.profiled
 PARAMSTRIP=.param.stripped
-LREFENTRY=../tools/xsl/build/lrefentry.xsl
 
 WORDML = $(STYLESHEETDIR)/docbook.xsl
 PAGES = $(STYLESHEETDIR)/docbook-pages.xsl
@@ -23,32 +22,25 @@ include Makefile.param
 
 all: param.xsl
 
-xml: param.xml
-
-html: param.html
-
-param.html: param.xml
-       $(XSLT) $< $(LREFENTRY) $@
-
-param.xml: param.xweb $(PARAMS)
-       ../../cvstools/paramchk -m Makefile.param $<
-       $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html
-       $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
-       $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@
-       $(RM) $(PARAMPROF) $(PARAMSTRIP)
-
 param.xsl:     param.xweb
        ../../cvstools/paramchk -m Makefile.param $<
        $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=wordml
        $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition
+ifeq ($(ADDNEWLINE),)
        $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@
+else
+       $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp
+       $(XSLT) $@.tmp $(ADDNEWLINE) $@
+       $(RM) $@.tmp
+endif
        $(RM) $(PARAMPROF) $(PARAMSTRIP)
 
 Makefile.param:
        ../../cvstools/paramchk -m $@ param.xweb
+       $(MAKE)
 
 clean:
-       $(RM) param.xml param.html param.xsl
+       $(RM) param.xsl
        $(RM) Makefile.param
        echo "# foo" > Makefile.param