13c15da26Smrg# 23c15da26Smrg# Generate output formats for a single DocBook/XML with/without chapters 33c15da26Smrg# 43c15da26Smrg# Variables set by the calling Makefile: 53c15da26Smrg# shelfdir: the location where the docs/specs are installed. Typically $(docdir) 63c15da26Smrg# docbook: the main DocBook/XML file, no chapters, appendix or image files 73c15da26Smrg# chapters: all files pulled in by an XInclude statement and images. 83c15da26Smrg# 93c15da26Smrg 103c15da26Smrg# 113c15da26Smrg# This makefile is intended for Users Documentation and Functional Specifications. 123c15da26Smrg# Do not use for Developer Documentation which is not installed and does not require olink. 133c15da26Smrg# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 143c15da26Smrg# for an explanation on documents classification. 153c15da26Smrg# 163c15da26Smrg 173c15da26Smrg# DocBook/XML generated output formats to be installed 183c15da26Smrgshelf_DATA = 193c15da26Smrg 203c15da26Smrg# DocBook/XML file with chapters, appendix and images it includes 213c15da26Smrgdist_shelf_DATA = $(docbook) $(chapters) 223c15da26Smrg 233c15da26Smrgif HAVE_XMLTO 243c15da26Smrgif HAVE_STYLESHEETS 253c15da26Smrg 263c15da26SmrgXMLTO_SEARCHPATH_FLAGS = \ 273c15da26Smrg --searchpath "$(XORG_SGML_PATH)/X11" \ 283c15da26Smrg --searchpath "$(abs_top_builddir)" 293c15da26SmrgXMLTO_HTML_OLINK_FLAGS = \ 303c15da26Smrg --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \ 313c15da26Smrg --stringparam current.docid="$(<:.xml=)" 323c15da26SmrgXMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl 333c15da26SmrgXMLTO_HTML_FLAGS = \ 343c15da26Smrg $(XMLTO_SEARCHPATH_FLAGS) \ 353c15da26Smrg $(XMLTO_HTML_STYLESHEET_FLAGS) \ 363c15da26Smrg $(XMLTO_HTML_OLINK_FLAGS) 373c15da26Smrg 383c15da26Smrgshelf_DATA += $(docbook:.xml=.html) 393c15da26Smrg%.html: %.xml $(chapters) 403c15da26Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< 413c15da26Smrg 423c15da26Smrgif HAVE_XMLTO_TEXT 433c15da26Smrg 443c15da26Smrgshelf_DATA += $(docbook:.xml=.txt) 453c15da26Smrg%.txt: %.xml $(chapters) 463c15da26Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< 473c15da26Smrgendif HAVE_XMLTO_TEXT 483c15da26Smrg 493c15da26Smrgif HAVE_FOP 503c15da26SmrgXMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/ 513c15da26SmrgXMLTO_PDF_OLINK_FLAGS = \ 523c15da26Smrg --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \ 533c15da26Smrg --stringparam current.docid="$(<:.xml=)" 543c15da26SmrgXMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl 553c15da26Smrg 563c15da26SmrgXMLTO_FO_FLAGS = \ 573c15da26Smrg $(XMLTO_SEARCHPATH_FLAGS) \ 583c15da26Smrg $(XMLTO_FO_STYLESHEET_FLAGS) \ 593c15da26Smrg $(XMLTO_FO_IMAGEPATH_FLAGS) \ 603c15da26Smrg $(XMLTO_PDF_OLINK_FLAGS) 613c15da26Smrg 623c15da26Smrgshelf_DATA += $(docbook:.xml=.pdf) 633c15da26Smrg%.pdf: %.xml $(chapters) 643c15da26Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< 653c15da26Smrg 663c15da26Smrgshelf_DATA += $(docbook:.xml=.ps) 673c15da26Smrg%.ps: %.xml $(chapters) 683c15da26Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< 693c15da26Smrgendif HAVE_FOP 703c15da26Smrg 713c15da26Smrg# Generate documents cross-reference target databases 723c15da26Smrgif HAVE_XSLTPROC 733c15da26Smrg 743c15da26SmrgXSLT_SEARCHPATH_FLAGS = \ 753c15da26Smrg --path "$(XORG_SGML_PATH)/X11" \ 763c15da26Smrg --path "$(abs_top_builddir)" 773c15da26SmrgXSLT_OLINK_FLAGS = \ 783c15da26Smrg --stringparam targets.filename "$@" \ 793c15da26Smrg --stringparam collect.xref.targets "only" \ 803c15da26Smrg --stringparam olink.base.uri "$(@:.db=)" 813c15da26Smrg 823c15da26SmrgXSLT_HTML_FLAGS = \ 833c15da26Smrg $(XSLT_SEARCHPATH_FLAGS) \ 843c15da26Smrg $(XSLT_OLINK_FLAGS) \ 853c15da26Smrg --nonet --xinclude \ 863c15da26Smrg $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl 873c15da26SmrgXSLT_PDF_FLAGS = \ 883c15da26Smrg $(XSLT_SEARCHPATH_FLAGS) \ 893c15da26Smrg $(XSLT_OLINK_FLAGS) \ 903c15da26Smrg --nonet --xinclude \ 913c15da26Smrg $(STYLESHEET_SRCDIR)/xorg-fo.xsl 923c15da26Smrg 933c15da26Smrgshelf_DATA += $(docbook:.xml=.html.db) 943c15da26Smrg%.html.db: %.xml $(chapters) 953c15da26Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $< 963c15da26Smrg 973c15da26Smrgshelf_DATA += $(docbook:.xml=.pdf.db) 983c15da26Smrg%.pdf.db: %.xml $(chapters) 993c15da26Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $< 1003c15da26Smrg 1013c15da26Smrgendif HAVE_XSLTPROC 1023c15da26Smrgendif HAVE_STYLESHEETS 1033c15da26Smrgendif HAVE_XMLTO 1043c15da26Smrg 1053c15da26SmrgCLEANFILES = $(shelf_DATA) 106