From 5e6b9ae7fc753342240e23a265de16980bb1e889 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 1 Jul 2007 09:44:15 +0000 Subject: [PATCH] Added a mechanism for "building" copies of the w2docbook.xsl, ldocbook.xsl, cldocbook.xsl, xtangle.xsl files. All that this "build" really does is to to first make the litprog module, then copy over those files to the releasetools directory, prepending to the copies a warning that they might not be up-to-date. And so am no also checking in those copies to source control, and updating the docbook-xsl build to use those instead of the source versions in the litprog module. This removes litprog as a build target/dependency for docbook-xsl. The sole purpose of this change is just to make it easier for other developers to do docbook-xsl release builds. The litprog sources change very rarely, so it won't be a big maintenance problem to keep these static copies in releasetools up to date, and it'll certainly make it easier for developers to do builds... --- releasetools/.make-litprog.xsl | 21 +++++ releasetools/cldocbook.xsl | 131 +++++++++++++++++++++++++++++ releasetools/ldocbook.xsl | 131 +++++++++++++++++++++++++++++ releasetools/w2docbook.xsl | 71 ++++++++++++++++ releasetools/xtangle.xsl | 129 ++++++++++++++++++++++++++++ xsl/Makefile | 5 +- xsl/Makefile.incl | 2 +- xsl/README.RELEASE-BUILD | 44 +++++----- xsl/docsrc/Makefile.incl | 4 +- xsl/lib/Makefile | 8 +- xsl/tools/xsl/build/clrefentry.xsl | 2 +- xsl/tools/xsl/build/lrefentry.xsl | 2 +- 12 files changed, 517 insertions(+), 33 deletions(-) create mode 100644 releasetools/.make-litprog.xsl create mode 100644 releasetools/cldocbook.xsl create mode 100644 releasetools/ldocbook.xsl create mode 100644 releasetools/w2docbook.xsl create mode 100644 releasetools/xtangle.xsl diff --git a/releasetools/.make-litprog.xsl b/releasetools/.make-litprog.xsl new file mode 100644 index 000000000..9bbf3895b --- /dev/null +++ b/releasetools/.make-litprog.xsl @@ -0,0 +1,21 @@ + + + + + + * + * This is a static copy of the file from the litprog module. + * It *MAY NOT BE UP TO DATE*. It is provided for the convenience of + * developers who don't want to generate the file themselves from + * the sources in the ../litprog directory. To create a fresh up-to-date + * copy of the file, check out that directory from the source repository + * and build it. + * + + + + + + + diff --git a/releasetools/cldocbook.xsl b/releasetools/cldocbook.xsl new file mode 100644 index 000000000..31fa49ba0 --- /dev/null +++ b/releasetools/cldocbook.xsl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + § + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + diff --git a/releasetools/ldocbook.xsl b/releasetools/ldocbook.xsl new file mode 100644 index 000000000..aa3e5b1c1 --- /dev/null +++ b/releasetools/ldocbook.xsl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+

+ + + + + : + + , + + + + + + + + + + +

+
+ + + + + +
+              
+            
+
+ +
+              
+            
+
+
+
+
+ + + + + + § + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + diff --git a/releasetools/w2docbook.xsl b/releasetools/w2docbook.xsl new file mode 100644 index 000000000..c03cd87b7 --- /dev/null +++ b/releasetools/w2docbook.xsl @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + < + + + + + =" + + " + + > + + </ + + > + + + + <!-- + + --> + + + + <? + + + ?> + + + + + + diff --git a/releasetools/xtangle.xsl b/releasetools/xtangle.xsl new file mode 100644 index 000000000..19e7e47b6 --- /dev/null +++ b/releasetools/xtangle.xsl @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Link to fragment " + + " does not uniquely identify a single fragment. + + + + + Link " + + " does not point to a src:fragment. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsl/Makefile b/xsl/Makefile index ff63fbb26..411c4de12 100644 --- a/xsl/Makefile +++ b/xsl/Makefile @@ -54,16 +54,13 @@ ifeq (,$(findstring xsltproc,$(XSLT))) @echo "-----------------------------------------------------------------" endif -base: litprog +base: for i in $(DIRS) __bogus__; do \ if [ $$i != __bogus__ ] ; then \ echo "$(MAKE) -C $$i"; $(MAKE) -C $$i; \ fi \ done -litprog: - $(MAKE) -C ../litprog - xhtml: $(MAKE) -C xhtml diff --git a/xsl/Makefile.incl b/xsl/Makefile.incl index a527af393..be123988e 100644 --- a/xsl/Makefile.incl +++ b/xsl/Makefile.incl @@ -11,7 +11,7 @@ param.xsl: param.xweb $(PARAMS) $(DOCBOOK_SVN)/buildtools/paramchk -m Makefile.param $< $(XSLT) $< $(DOCBOOK_SVN)/xsl/profiling/profile.xsl $(PARAMPROF) profile.condition=$(PROFILECONDITION) $(XSLT) $(PARAMPROF) $(DOCBOOK_SVN)/xsl/profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition - $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/litprog/xtangle.xsl $(PARAMDBKNS) + $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/releasetools/xtangle.xsl $(PARAMDBKNS) ifeq ($(ADDNEWLINE),) $(XSLT) $(PARAMDBKNS) $(FIXPARAMNS) $@ else diff --git a/xsl/README.RELEASE-BUILD b/xsl/README.RELEASE-BUILD index 439d2e6a5..71312f0ac 100644 --- a/xsl/README.RELEASE-BUILD +++ b/xsl/README.RELEASE-BUILD @@ -21,14 +21,17 @@ Release Build Setup/Testing source for the "xsl" module, you also need to have up-to-date working copies of the following modules: - gentext - litprog buildtools + tools needed for all builds releasetools + tools needed for release builds + gentext + localization source files a. Shell Environment. - To get my environment variables set up, I have a file that I - name "docbk.sh", with the following in it: + A good way to get your environment variables set up is to + create a file (name "docbk.sh" or whatever), with the + following in it: # directory that is base directory for all your DocBook modules export DOCBOOK_SVN=/opt/sandbox/docbook/trunk @@ -43,7 +46,8 @@ Release Build Setup/Testing export CLASSPATH=$CLASSPATH:/etc/xml/resolver/ export SGML_CATALOG_FILES=/etc/sgml/catalog - I source that by putting the following in my ~/.bashrc file: + You can then source that by putting the following in your + ~/.bashrc file: # set up some environment variables for DocBook/XML stuff . ~/docbk.sh @@ -51,7 +55,7 @@ Release Build Setup/Testing b. .xmlrc You need an .xmlrc file with some system-specific data for Java - and XML tools in your environment. I use the following: + and XML tools in your environment. For example: @@ -89,8 +93,8 @@ Release Build Setup/Testing Run a test "make all" build to make sure there are no problems with the non-docs/non-release "normal" part of the build (the part that basically just builds the gentext and param files and - gives you a working set of stylesheets to use). The way I - usually run that is this: + gives you a working set of stylesheets to use). On way to run + that is this: . ~/docbk.sh && \ svn-clean && \ @@ -104,14 +108,14 @@ Release Build Setup/Testing NOTE: The svn-clean command is something that's not part of the core subversion distribution (on my system, it's part of the subversion-tools package). Its function is to "wipe out - unversioned files from Subversion working copy". I use it - because our own "clean" make target doesn't clean out - everything that needs to be cleaned out to get your working - directory back to a fresh state. But svn-clean does. + unversioned files from Subversion working copy". It is a good + idea to use it because our own "clean" make target doesn't + clean out everything that needs to be cleaned out to get your + working directory back to a fresh state. But svn-clean does. 2. grep the LOG file. - After running the above, I then grep through the LOG file to - see if anything looks busted, using something like: + After running the above, grep through the LOG file to see if + anything looks busted, using something like: egrep -i "error|fail|\*[^.]" LOG @@ -178,8 +182,8 @@ Release Build Setup/Testing NOTE: The engine specified in PDF_MAKER is only used to build a PDF of the release notes. If you want to use xep instead of dblatex, specify PDF_MAKER=xep. (There's no option to use fop - because last time I tested it, fop still did a miserable job of - formatting the release notes.) + because fop still doesn't do an adequate job of formatting the + release notes.) NOTE: The "make install.sh && ./install.sh --batch && . $(pwd)/.profile.incl" parts do an "install" of XML Catalog @@ -217,10 +221,10 @@ Release Preparation "Major feature enhancements", "Minor bugfixes", etc. c. If necessary, edit the fm:Changes element to describe this release. Keep it at one sentence; e.g.; "This is a bug-fix - release with a few feature enhancements." I don't recommend - wasting time doing much more than that, because the dumbass - at Freshmeat who reviews all submissions will likely edit - what you submit and manage to bork it up in some way. + release with a few feature enhancements." It's not a good + idea to waste time doing much more than that, because the + dumbass at Freshmeat who reviews all submissions will likely + edit what you submit and manage to bork it up in some way. 2. Check in the VERSION file: diff --git a/xsl/docsrc/Makefile.incl b/xsl/docsrc/Makefile.incl index ead4c7c8b..522b89eef 100644 --- a/xsl/docsrc/Makefile.incl +++ b/xsl/docsrc/Makefile.incl @@ -15,9 +15,9 @@ docparam.xml: $(VPATH)/param.xweb $(PARAMS) $(XSLT) $< ../../profiling/profile.xsl $(PARAMPROF) profile.condition=html $(XSLT) $(PARAMPROF) ../../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition ifeq ($(ADDNEWLINE),) - $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/litprog/w2docbook.xsl $@ + $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/releasetools/w2docbook.xsl $@ else - $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/litprog/w2docbook.xsl $@.tmp + $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/releasetools/w2docbook.xsl $@.tmp $(XSLT) $@.tmp $(ADDNEWLINE) $@ $(RM) $@.tmp endif diff --git a/xsl/lib/Makefile b/xsl/lib/Makefile index 563f913cc..c32720e4f 100644 --- a/xsl/lib/Makefile +++ b/xsl/lib/Makefile @@ -13,9 +13,9 @@ 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 $@ + $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/releasetools/w2docbook.xsl $@ else - $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@.tmp + $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/releasetools/w2docbook.xsl $@.tmp $(XSLT) $@.tmp $(ADDNEWLINE) $@ $(RM) $@.tmp endif @@ -25,9 +25,9 @@ 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 $@ + $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/releasetools/xtangle.xsl $@ else - $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp + $(XSLT) $(PARAMSTRIP) $(DOCBOOK_SVN)/releasetools/xtangle.xsl $@.tmp $(XSLT) $@.tmp $(ADDNEWLINE) $@ $(RM) $@.tmp endif diff --git a/xsl/tools/xsl/build/clrefentry.xsl b/xsl/tools/xsl/build/clrefentry.xsl index 77e124cd8..5a11fdb9e 100644 --- a/xsl/tools/xsl/build/clrefentry.xsl +++ b/xsl/tools/xsl/build/clrefentry.xsl @@ -5,7 +5,7 @@ exclude-result-prefixes="src verb" version="1.0"> - + diff --git a/xsl/tools/xsl/build/lrefentry.xsl b/xsl/tools/xsl/build/lrefentry.xsl index 92c8b7ac0..1adf340f1 100644 --- a/xsl/tools/xsl/build/lrefentry.xsl +++ b/xsl/tools/xsl/build/lrefentry.xsl @@ -5,7 +5,7 @@ exclude-result-prefixes="src verb" version="1.0"> - + § -- 2.40.0