diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-06T19·45+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-06T19·45+0200 |
commit | 998b977ede9948f78a6a913ecedf3361eb14f769 (patch) | |
tree | 913b7fff706ea75b5bf83b89c8fb84f4df008b1e /doc/manual/Makefile.am | |
parent | d49ef039dd61dba160cb0b78c6b00152ff9e680e (diff) |
Include common options in the manpages using some XInclude hackery
Diffstat (limited to 'doc/manual/Makefile.am')
-rw-r--r-- | doc/manual/Makefile.am | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index 637d370c17f6..009496a8f681 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -1,5 +1,5 @@ -XMLLINT = $(xmllint) $(xmlflags) -XSLTPROC = $(xsltproc) $(xmlflags) \ +XMLLINT = $(xmllint) --nonet $(xmlflags) +XSLTPROC = $(xsltproc) --nonet $(xmlflags) \ --param section.autolabel 1 \ --param section.label.includes.component.label 1 \ --param html.stylesheet \'style.css\' \ @@ -34,24 +34,36 @@ MANUAL_SRCS = manual.xml introduction.xml installation.xml \ conf-file.xml release-notes.xml \ style.css images +# Do XInclude processing. +manual.xmli: $(MANUAL_SRCS) version.txt + $(XMLLINT) --xinclude $< -o $@.tmp + mv $@.tmp $@ + # Note: RelaxNG validation requires xmllint >= 2.7.4. -manual.is-valid: $(MANUAL_SRCS) version.txt - $(XMLLINT) --noout --nonet --xinclude --noxincludenode --relaxng $(docbookrng)/docbook.rng $< +manual.is-valid: manual.xmli + $(XSLTPROC) --novalid --stringparam profile.condition manual \ + $(docbookxsl)/profiling/profile.xsl $< 2> /dev/null | \ + $(XMLLINT) --noout --relaxng $(docbookrng)/docbook.rng - touch $@ version.txt: echo -n $(VERSION) > version.txt -man $(MANS): $(MANUAL_SRCS) manual.is-valid - $(XSLTPROC) --nonet --xinclude $(docbookxsl)/manpages/docbook.xsl manual.xml +man $(MANS): manual.is-valid + $(XSLTPROC) --stringparam profile.condition manpage \ + $(docbookxsl)/profiling/profile.xsl manual.xmli 2> /dev/null | \ + $(XSLTPROC) $(docbookxsl)/manpages/docbook.xsl - manual.html: $(MANUAL_SRCS) manual.is-valid images - $(XSLTPROC) --nonet --xinclude --output manual.html \ - $(docbookxsl)/html/docbook.xsl manual.xml + $(XSLTPROC) --xinclude --stringparam profile.condition manual \ + $(docbookxsl)/profiling/profile.xsl manual.xml | \ + $(XSLTPROC) --output manual.html $(docbookxsl)/html/docbook.xsl - manual.pdf: $(MANUAL_SRCS) manual.is-valid images if test "$(dblatex)" != ""; then \ - $(dblatex) $(dblatex_opts) manual.xml; \ + $(XSLTPROC) --xinclude --stringparam profile.condition manual \ + $(docbookxsl)/profiling/profile.xsl manual.xml | \ + $(dblatex) -o manual.pdf $(dblatex_opts) -; \ else \ echo "Please install dblatex and rerun configure."; \ exit 1; \ @@ -64,12 +76,12 @@ NEWS_OPTS = \ --stringparam header.rule 0 NEWS.html: release-notes.xml - $(XSLTPROC) --nonet --xinclude --output $@ $(NEWS_OPTS) \ + $(XSLTPROC) --xinclude --output $@ $(NEWS_OPTS) \ $(docbookxsl)/html/docbook.xsl release-notes.xml NEWS.txt: release-notes.xml - $(XSLTPROC) --nonet --xinclude quote-literals.xsl release-notes.xml | \ - $(XSLTPROC) --nonet --output $@.tmp.html $(NEWS_OPTS) \ + $(XSLTPROC) --xinclude quote-literals.xsl release-notes.xml | \ + $(XSLTPROC) --output $@.tmp.html $(NEWS_OPTS) \ $(docbookxsl)/html/docbook.xsl - LANG=en_US $(w3m) -dump $@.tmp.html > $@ rm $@.tmp.html |