summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2011-09-05 12:53:12 -0400
committerGaetan Nadon <memsize@videotron.ca>2011-09-09 14:44:53 -0400
commit24632d280491c465dfe208ef788815890892e326 (patch)
treed6c4dd667e58f2499dd9eed9351108b9db627316
parent93ab0a1c9a4f9094cf0c8e1c686130673e681798 (diff)
compose: upgrade makefile to support olinking on chunked html
The essential differences over the regular docbook.am are: Adding root.filename parameter for naming of chapters html files. Using xhtml xmlto format and xorg-chunk.xsl stylesheet Set olink.base.uri for pdf but not for chunked html Olink is not applicable to ps and txt formats. Html chapters are added to shelf_DATA as they are also installed. The xml is generated from a perl script and not distributed. Requires version 1.10 of xorg-sgml-doctools. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac2
-rw-r--r--docbook-gen-chunk.am102
-rw-r--r--docbook-gen.am96
-rw-r--r--docbook.am95
-rw-r--r--specs/i18n/compose/Makefile.am11
-rw-r--r--specs/i18n/compose/docbook-nl.am132
6 files changed, 176 insertions, 262 deletions
diff --git a/configure.ac b/configure.ac
index 44c9afc1..9a87453d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ XORG_ENABLE_SPECS
XORG_WITH_XMLTO(0.0.22)
XORG_WITH_FOP([],[no])
XORG_WITH_XSLTPROC
-XORG_CHECK_SGML_DOCTOOLS(1.9)
+XORG_CHECK_SGML_DOCTOOLS(1.10)
XORG_PROG_RAWCPP
XORG_WITH_PERL
diff --git a/docbook-gen-chunk.am b/docbook-gen-chunk.am
deleted file mode 100644
index 46d485ff..00000000
--- a/docbook-gen-chunk.am
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# Generate output formats for a single DocBook/XML with/without chapters
-# This version of docbook.am handles cases where XML source is generated
-# and the html to be produced must be in chunks, one per chapter.
-# The generated source must be cleaned, installed but not distributed
-#
-# Variables set by the calling Makefile:
-# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
-# docbook: the main DocBook/XML file, no chapters, appendix or image files
-# chapters: all files pulled in by an XInclude statement and images.
-#
-
-#
-# This makefile is intended for Users Documentation and Functional Specifications.
-# Do not use for Developer Documentation which is not installed and does not require olink.
-# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
-# for an explanation on documents classification.
-#
-
-# DocBook/XML generated output formats to be installed
-shelf_DATA = $(chapters) $(docbook)
-
-if HAVE_XMLTO
-#
-# Generate DocBook/XML output formats with or without stylesheets
-#
-
-# Stylesheets are available if the package xorg-sgml-doctools is installed
-if HAVE_STYLESHEETS
-
-# The location where all cross reference databases are installed
-sgmldbsdir = $(XORG_SGML_PATH)/X11/dbs
-masterdb = "$(sgmldbsdir)/masterdb$(suffix $@).xml"
-XMLTO_FLAGS = \
- --searchpath "$(XORG_SGML_PATH)/X11" \
- --stringparam target.database.document=$(masterdb) \
- --stringparam current.docid="$(<:.xml=)" \
- --stringparam collect.xref.targets="no"
-
-XMLTO_XHTML_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl \
- --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
-
-XMLTO_CHUNK_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-chunk.xsl \
- --stringparam root.filename="$(<:.xml=)" \
- --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
-
-XMLTO_FO_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
-endif HAVE_STYLESHEETS
-
-shelf_DATA += $(docbook:.xml=.html) $(chapters:.xml=.html)
-%.html: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_CHUNK_FLAGS) xhtml $<
-
-if HAVE_FOP
-shelf_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
-%.pdf: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop pdf $<
-%.ps: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop ps $<
-endif HAVE_FOP
-
-if HAVE_XMLTO_TEXT
-shelf_DATA += $(docbook:.xml=.txt)
-%.txt: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) txt $<
-endif HAVE_XMLTO_TEXT
-
-#
-# Generate documents cross-reference target databases
-#
-
-# This is only possible if the xorg-sgml-doctools package is installed
-if HAVE_STYLESHEETS
-if HAVE_XSLTPROC
-
-# DocBook/XML generated document cross-reference database
-shelf_DATA += $(docbook:.xml=.html.db) $(docbook:.xml=.fo.db)
-
-# Generate DocBook/XML document cross-reference database
-# Flags for the XSL Transformation processor generating xref target databases
-XSLTPROC_FLAGS = \
- --path "$(XORG_SGML_PATH)/X11" \
- --stringparam targets.filename "$@" \
- --stringparam collect.xref.targets "only" \
- --nonet --xinclude
-
-%.html.db: %.xml $(chapters)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
- http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $<
-
-%.fo.db: %.xml $(chapters)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
- http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl $<
-
-endif HAVE_XSLTPROC
-endif HAVE_STYLESHEETS
-endif HAVE_XMLTO
-
-CLEANFILES = $(shelf_DATA)
diff --git a/docbook-gen.am b/docbook-gen.am
deleted file mode 100644
index 292627ea..00000000
--- a/docbook-gen.am
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# Generate output formats for a single DocBook/XML with/without chapters
-# This version of docbook.am handles cases where XML source is generated
-# The generated source must be cleaned, installed but not distributed
-#
-# Variables set by the calling Makefile:
-# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
-# docbook: the main DocBook/XML file, no chapters, appendix or image files
-# chapters: all files pulled in by an XInclude statement and images.
-#
-
-#
-# This makefile is intended for Users Documentation and Functional Specifications.
-# Do not use for Developer Documentation which is not installed and does not require olink.
-# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
-# for an explanation on documents classification.
-#
-
-# DocBook/XML generated output formats to be installed
-shelf_DATA = $(chapters) $(docbook)
-
-if HAVE_XMLTO
-#
-# Generate DocBook/XML output formats with or without stylesheets
-#
-
-# Stylesheets are available if the package xorg-sgml-doctools is installed
-if HAVE_STYLESHEETS
-
-# The location where all cross reference databases are installed
-sgmldbsdir = $(XORG_SGML_PATH)/X11/dbs
-masterdb = "$(sgmldbsdir)/masterdb$(suffix $@).xml"
-XMLTO_FLAGS = \
- --searchpath "$(XORG_SGML_PATH)/X11" \
- --stringparam target.database.document=$(masterdb) \
- --stringparam current.docid="$(<:.xml=)" \
- --stringparam collect.xref.targets="no"
-
-XMLTO_XHTML_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl \
- --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
-
-XMLTO_FO_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
-endif HAVE_STYLESHEETS
-
-shelf_DATA += $(docbook:.xml=.html)
-%.html: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) xhtml-nochunks $<
-
-if HAVE_FOP
-shelf_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
-%.pdf: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop pdf $<
-%.ps: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop ps $<
-endif HAVE_FOP
-
-if HAVE_XMLTO_TEXT
-shelf_DATA += $(docbook:.xml=.txt)
-%.txt: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) txt $<
-endif HAVE_XMLTO_TEXT
-
-#
-# Generate documents cross-reference target databases
-#
-
-# This is only possible if the xorg-sgml-doctools package is installed
-if HAVE_STYLESHEETS
-if HAVE_XSLTPROC
-
-# DocBook/XML generated document cross-reference database
-shelf_DATA += $(docbook:.xml=.html.db) $(docbook:.xml=.fo.db)
-
-# Generate DocBook/XML document cross-reference database
-# Flags for the XSL Transformation processor generating xref target databases
-XSLTPROC_FLAGS = \
- --path "$(XORG_SGML_PATH)/X11" \
- --stringparam targets.filename "$@" \
- --stringparam collect.xref.targets "only" \
- --nonet --xinclude
-
-%.html.db: %.xml $(chapters)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
- http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $<
-
-%.fo.db: %.xml $(chapters)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
- http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $<
-
-endif HAVE_XSLTPROC
-endif HAVE_STYLESHEETS
-endif HAVE_XMLTO
-
-CLEANFILES = $(shelf_DATA)
diff --git a/docbook.am b/docbook.am
index c99fef6a..9377f5b3 100644
--- a/docbook.am
+++ b/docbook.am
@@ -23,49 +23,43 @@ dist_shelf_DATA = $(docbook) $(chapters)
if HAVE_XMLTO
if HAVE_STYLESHEETS
-# The name and location of cross referencing databases
-masterdb = "$(XORG_SGML_PATH)/X11/dbs/masterdb$(suffix $@).xml"
-
-XMLTO_SEARCHPATH_FLAGS = \
- --searchpath "$(XORG_SGML_PATH)/X11" \
+XMLTO_SEARCHPATH_FLAGS = \
+ --searchpath "$(XORG_SGML_PATH)/X11" \
--searchpath "$(abs_top_builddir)"
-XMLTO_OLINK_FLAGS = \
- --stringparam target.database.document=$(masterdb) \
+XMLTO_HTML_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
--stringparam current.docid="$(<:.xml=)"
-XMLTO_HTML_STYLESHEET_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
-XMLTO_CSS_STYLESHEET_FLAGS = \
- --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
-XMLTO_HTML_FLAGS = \
- $(XMLTO_HTML_STYLESHEET_FLAGS) \
- $(XMLTO_CSS_STYLESHEET_FLAGS) \
- $(XMLTO_SEARCHPATH_FLAGS) \
- $(XMLTO_OLINK_FLAGS)
+XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XMLTO_HTML_CSS_STYLESHEET_FLAGS = --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
+XMLTO_HTML_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_HTML_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_CSS_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_OLINK_FLAGS)
shelf_DATA += $(docbook:.xml=.html)
-%.html: %.xml $(chapters)
+%.html: %.xml $(chapters)
$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
if HAVE_XMLTO_TEXT
-XMLTO_TXT_FLAGS = \
- $(XMLTO_HTML_STYLESHEET_FLAGS) \
- $(XMLTO_SEARCHPATH_FLAGS)
shelf_DATA += $(docbook:.xml=.txt)
%.txt: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_TXT_FLAGS) txt $<
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
endif HAVE_XMLTO_TEXT
if HAVE_FOP
-XMLTO_FO_IMAGEPATH_FLAGS = \
- --stringparam img.src.path=$(abs_builddir)/
-XMLTO_FO_STYLESHEET_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
-XMLTO_FO_FLAGS = \
- $(XMLTO_FO_STYLESHEET_FLAGS) \
- $(XMLTO_FO_IMAGEPATH_FLAGS) \
- $(XMLTO_SEARCHPATH_FLAGS) \
- $(XMLTO_OLINK_FLAGS)
+XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
+XMLTO_PDF_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+XMLTO_FO_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_FO_STYLESHEET_FLAGS) \
+ $(XMLTO_FO_IMAGEPATH_FLAGS) \
+ $(XMLTO_PDF_OLINK_FLAGS)
shelf_DATA += $(docbook:.xml=.pdf)
%.pdf: %.xml $(chapters)
@@ -79,37 +73,32 @@ endif HAVE_FOP
# Generate documents cross-reference target databases
if HAVE_XSLTPROC
-XSLT_SEARCHPATH_FLAGS = \
- --path "$(XORG_SGML_PATH)/X11" \
+XSLT_SEARCHPATH_FLAGS = \
+ --path "$(XORG_SGML_PATH)/X11" \
--path "$(abs_top_builddir)"
-XSLT_OLINK_FLAGS = \
- --stringparam targets.filename "$@" \
- --stringparam collect.xref.targets "only"
-XSLT_HTML_STYLESHEET_FLAGS = \
+XSLT_OLINK_FLAGS = \
+ --stringparam targets.filename "$@" \
+ --stringparam collect.xref.targets "only" \
+ --stringparam olink.base.uri "$(@:.db=)"
+
+XSLT_HTML_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
$(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
-XSLT_FO_STYLESHEET_FLAGS = \
+XSLT_PDF_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
$(STYLESHEET_SRCDIR)/xorg-fo.xsl
-XSLT_PROC_FLAGS = \
- --nonet --xinclude
-XSLT_HTML_FLAGS = \
- $(XSLT_SEARCHPATH_FLAGS) \
- $(XSLT_OLINK_FLAGS) \
- $(XSLT_PROC_FLAGS) \
- $(XSLT_HTML_STYLESHEET_FLAGS)
-
-XSLT_FO_FLAGS = \
- $(XSLT_SEARCHPATH_FLAGS) \
- $(XSLT_OLINK_FLAGS) \
- $(XSLT_PROC_FLAGS) \
- $(XSLT_FO_STYLESHEET_FLAGS)
shelf_DATA += $(docbook:.xml=.html.db)
%.html.db: %.xml $(chapters)
$(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
-shelf_DATA += $(docbook:.xml=.fo.db)
-%.fo.db: %.xml $(chapters)
- $(AM_V_GEN)$(XSLTPROC) $(XSLT_FO_FLAGS) $<
+shelf_DATA += $(docbook:.xml=.pdf.db)
+%.pdf.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
endif HAVE_XSLTPROC
endif HAVE_STYLESHEETS
diff --git a/specs/i18n/compose/Makefile.am b/specs/i18n/compose/Makefile.am
index 5cfbca86..9e3a26de 100644
--- a/specs/i18n/compose/Makefile.am
+++ b/specs/i18n/compose/Makefile.am
@@ -12,16 +12,7 @@ shelfdir = $(docdir)/i18n/compose
# Generate DocBook/XML output formats with or without stylesheets
# The XML source is generated and cleaned but not distributed
-include $(top_srcdir)/docbook-gen-chunk.am
-
-# Generated DocBook/XML source files using a perl script
-%.xml: $(top_builddir)/nls/%/Compose
- $(AM_V_GEN)$(PERL) $(srcdir)/compose-chart.pl \
- --locale="$(@:.xml=)" --output="$@" $<
-
-libX11-keys.xml: $(locales:%=%.xml)
- $(AM_V_GEN)$(PERL) $(srcdir)/compose-chart.pl \
- --index --output="$@" $(locales)
+include docbook-nl.am
endif HAVE_PERL
endif ENABLE_SPECS
diff --git a/specs/i18n/compose/docbook-nl.am b/specs/i18n/compose/docbook-nl.am
new file mode 100644
index 00000000..28801330
--- /dev/null
+++ b/specs/i18n/compose/docbook-nl.am
@@ -0,0 +1,132 @@
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# This version of docbook.am handles cases where XML source is generated
+# and the html to be produced must be in chunks, one per chapter.
+# The generated source must be cleaned, installed but not distributed
+#
+# Variables set by the calling Makefile:
+# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
+# docbook: the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Users Documentation and Functional Specifications.
+# Do not use for Developer Documentation which is not installed and does not require olink.
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# DocBook/XML generated output formats to be installed
+shelf_DATA = $(chapters) $(docbook)
+
+# Generated DocBook/XML source files using a perl script
+%.xml: $(top_builddir)/nls/%/Compose
+ $(AM_V_GEN)$(PERL) $(srcdir)/compose-chart.pl \
+ --locale="$(@:.xml=)" --output="$@" $<
+
+libX11-keys.xml: $(locales:%=%.xml)
+ $(AM_V_GEN)$(PERL) $(srcdir)/compose-chart.pl \
+ --index --output="$@" $(locales)
+
+if HAVE_XMLTO
+if HAVE_STYLESHEETS
+
+XMLTO_SEARCHPATH_FLAGS = \
+ --searchpath "$(XORG_SGML_PATH)/X11" \
+ --searchpath "$(abs_top_builddir)"
+XMLTO_HTML_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-chunk.xsl
+XMLTO_TXT_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XMLTO_CSS_STYLESHEET_FLAGS = \
+ --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
+XMLTO_HTML_CHUNKING_FLAGS = \
+ --stringparam root.filename="$(<:.xml=)"
+XMLTO_HTML_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_HTML_STYLESHEET_FLAGS) \
+ $(XMLTO_CSS_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_CHUNKING_FLAGS) \
+ $(XMLTO_HTML_OLINK_FLAGS)
+XMLTO_TXT_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_TXT_STYLESHEET_FLAGS) \
+ $(XMLTO_CSS_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.html) $(chapters:.xml=.html)
+%.html: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml $<
+
+if HAVE_XMLTO_TEXT
+
+shelf_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_TXT_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+if HAVE_FOP
+XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
+XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+XMLTO_PDF_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_FO_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_FO_STYLESHEET_FLAGS) \
+ $(XMLTO_FO_IMAGEPATH_FLAGS) \
+ $(XMLTO_PDF_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.pdf)
+%.pdf: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+
+shelf_DATA += $(docbook:.xml=.ps)
+%.ps: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+
+# Generate documents cross-reference target databases
+if HAVE_XSLTPROC
+
+XSLT_SEARCHPATH_FLAGS = \
+ --path "$(XORG_SGML_PATH)/X11" \
+ --path "$(abs_top_builddir)"
+XSLT_OLINK_FLAGS = \
+ --stringparam targets.filename "$@" \
+ --stringparam collect.xref.targets "only"
+XSLT_FO_OLINK_FLAGS = \
+ --stringparam olink.base.uri "$(@:.db=)"
+XSLT_HTML_CHUNKING_FLAGS = \
+ --stringparam root.filename "$(<:.xml=)"
+
+XSLT_HTML_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_HTML_CHUNKING_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-chunk.xsl
+
+XSLT_PDF_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ $(XSLT_FO_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+shelf_DATA += $(docbook:.xml=.html.db)
+%.html.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
+
+shelf_DATA += $(docbook:.xml=.pdf.db)
+%.pdf.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
+
+endif HAVE_XSLTPROC
+endif HAVE_STYLESHEETS
+endif HAVE_XMLTO
+
+CLEANFILES = $(shelf_DATA)