135c4bbdfSmrg#
235c4bbdfSmrg# Generate output formats for a single DocBook/XML with/without chapters
335c4bbdfSmrg#
435c4bbdfSmrg# Variables set by the calling Makefile:
535c4bbdfSmrg# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
635c4bbdfSmrg# docbook:  the main DocBook/XML file, no chapters, appendix or image files
735c4bbdfSmrg# chapters: all files pulled in by an XInclude statement and images.
835c4bbdfSmrg#
935c4bbdfSmrg
1035c4bbdfSmrg#
1135c4bbdfSmrg# This makefile is intended for Users Documentation and Functional Specifications.
1235c4bbdfSmrg# Do not use for Developer Documentation which is not installed and does not require olink.
1335c4bbdfSmrg# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
1435c4bbdfSmrg# for an explanation on documents classification.
1535c4bbdfSmrg#
1635c4bbdfSmrg
1735c4bbdfSmrg# DocBook/XML generated output formats to be installed
1835c4bbdfSmrgshelf_DATA =
1935c4bbdfSmrg
2035c4bbdfSmrg# DocBook/XML file with chapters, appendix and images it includes
2135c4bbdfSmrgdist_shelf_DATA = $(docbook) $(chapters)
2235c4bbdfSmrg
2335c4bbdfSmrgif HAVE_XMLTO
2435c4bbdfSmrgif HAVE_STYLESHEETS
2535c4bbdfSmrg
2635c4bbdfSmrgXMLTO_SEARCHPATH_FLAGS = 				\
2735c4bbdfSmrg	--searchpath "$(XORG_SGML_PATH)/X11" 		\
2835c4bbdfSmrg	--searchpath "$(abs_top_builddir)"
2935c4bbdfSmrgXMLTO_HTML_OLINK_FLAGS = \
3035c4bbdfSmrg	--stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
3135c4bbdfSmrg	--stringparam current.docid="$(<:.xml=)"
3235c4bbdfSmrgXMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
3335c4bbdfSmrgXMLTO_HTML_FLAGS = 					\
3435c4bbdfSmrg	$(XMLTO_SEARCHPATH_FLAGS)			\
3535c4bbdfSmrg	$(XMLTO_HTML_STYLESHEET_FLAGS)			\
3635c4bbdfSmrg	$(XMLTO_HTML_OLINK_FLAGS)
3735c4bbdfSmrg
3835c4bbdfSmrgshelf_DATA += $(docbook:.xml=.html)
3935c4bbdfSmrg%.html: %.xml $(chapters)
4035c4bbdfSmrg	$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
4135c4bbdfSmrg
4235c4bbdfSmrgif HAVE_XMLTO_TEXT
4335c4bbdfSmrg
4435c4bbdfSmrgshelf_DATA += $(docbook:.xml=.txt)
4535c4bbdfSmrg%.txt: %.xml $(chapters)
4635c4bbdfSmrg	$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
4735c4bbdfSmrgendif HAVE_XMLTO_TEXT
4835c4bbdfSmrg
4935c4bbdfSmrgif HAVE_FOP
5035c4bbdfSmrgXMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
5135c4bbdfSmrgXMLTO_PDF_OLINK_FLAGS = \
5235c4bbdfSmrg	--stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
5335c4bbdfSmrg	--stringparam current.docid="$(<:.xml=)"
5435c4bbdfSmrgXMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
5535c4bbdfSmrg
5635c4bbdfSmrgXMLTO_FO_FLAGS = 					\
5735c4bbdfSmrg	$(XMLTO_SEARCHPATH_FLAGS)			\
5835c4bbdfSmrg	$(XMLTO_FO_STYLESHEET_FLAGS)			\
5935c4bbdfSmrg	$(XMLTO_FO_IMAGEPATH_FLAGS)			\
6035c4bbdfSmrg	$(XMLTO_PDF_OLINK_FLAGS)
6135c4bbdfSmrg
6235c4bbdfSmrgshelf_DATA += $(docbook:.xml=.pdf)
6335c4bbdfSmrg%.pdf: %.xml $(chapters)
6435c4bbdfSmrg	$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
6535c4bbdfSmrg
6635c4bbdfSmrgshelf_DATA += $(docbook:.xml=.ps)
6735c4bbdfSmrg%.ps: %.xml $(chapters)
6835c4bbdfSmrg	$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
6935c4bbdfSmrgendif HAVE_FOP
7035c4bbdfSmrg
7135c4bbdfSmrg# Generate documents cross-reference target databases
7235c4bbdfSmrgif HAVE_XSLTPROC
7335c4bbdfSmrg
7435c4bbdfSmrgXSLT_SEARCHPATH_FLAGS = 				\
7535c4bbdfSmrg	--path "$(XORG_SGML_PATH)/X11"			\
7635c4bbdfSmrg	--path "$(abs_top_builddir)"
7735c4bbdfSmrgXSLT_OLINK_FLAGS = 					\
7835c4bbdfSmrg	--stringparam targets.filename "$@" 		\
7935c4bbdfSmrg	--stringparam collect.xref.targets "only" 	\
8035c4bbdfSmrg	--stringparam olink.base.uri "$(@:.db=)"
8135c4bbdfSmrg
8235c4bbdfSmrgXSLT_HTML_FLAGS =					\
8335c4bbdfSmrg	$(XSLT_SEARCHPATH_FLAGS) 			\
8435c4bbdfSmrg	$(XSLT_OLINK_FLAGS)				\
8535c4bbdfSmrg	--nonet --xinclude				\
8635c4bbdfSmrg	$(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
8735c4bbdfSmrgXSLT_PDF_FLAGS = 					\
8835c4bbdfSmrg	$(XSLT_SEARCHPATH_FLAGS) 			\
8935c4bbdfSmrg	$(XSLT_OLINK_FLAGS)				\
9035c4bbdfSmrg	--nonet --xinclude				\
9135c4bbdfSmrg	$(STYLESHEET_SRCDIR)/xorg-fo.xsl
9235c4bbdfSmrg
9335c4bbdfSmrgshelf_DATA += $(docbook:.xml=.html.db)
9435c4bbdfSmrg%.html.db: %.xml  $(chapters)
9535c4bbdfSmrg	$(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
9635c4bbdfSmrg
9735c4bbdfSmrgshelf_DATA += $(docbook:.xml=.pdf.db)
9835c4bbdfSmrg%.pdf.db: %.xml $(chapters)
9935c4bbdfSmrg	$(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
10035c4bbdfSmrg
10135c4bbdfSmrgendif HAVE_XSLTPROC
10235c4bbdfSmrgendif HAVE_STYLESHEETS
10335c4bbdfSmrgendif HAVE_XMLTO
10435c4bbdfSmrg
10535c4bbdfSmrgCLEANFILES = $(shelf_DATA)
106