19ef0b394Smrg# 29ef0b394Smrg# Generate output formats for a single DocBook/XML with/without chapters 39ef0b394Smrg# 49ef0b394Smrg# Variables set by the calling Makefile: 59ef0b394Smrg# shelfdir: the location where the docs/specs are installed. Typically $(docdir) 69ef0b394Smrg# docbook: the main DocBook/XML file, no chapters, appendix or image files 79ef0b394Smrg# chapters: all files pulled in by an XInclude statement and images. 89ef0b394Smrg# 99ef0b394Smrg 109ef0b394Smrg# 119ef0b394Smrg# This makefile is intended for Users Documentation and Functional Specifications. 129ef0b394Smrg# Do not use for Developer Documentation which is not installed and does not require olink. 139ef0b394Smrg# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 149ef0b394Smrg# for an explanation on documents classification. 159ef0b394Smrg# 169ef0b394Smrg 179ef0b394Smrg# DocBook/XML generated output formats to be installed 189ef0b394Smrgshelf_DATA = 199ef0b394Smrg 209ef0b394Smrg# DocBook/XML file with chapters, appendix and images it includes 219ef0b394Smrgdist_shelf_DATA = $(docbook) $(chapters) 229ef0b394Smrg 239ef0b394Smrgif HAVE_XMLTO 249ef0b394Smrgif HAVE_STYLESHEETS 259ef0b394Smrg 269ef0b394SmrgXMLTO_SEARCHPATH_FLAGS = \ 279ef0b394Smrg --searchpath "$(XORG_SGML_PATH)/X11" \ 289ef0b394Smrg --searchpath "$(abs_top_builddir)" 299ef0b394SmrgXMLTO_HTML_OLINK_FLAGS = \ 309ef0b394Smrg --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \ 319ef0b394Smrg --stringparam current.docid="$(<:.xml=)" 329ef0b394SmrgXMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl 339ef0b394SmrgXMLTO_HTML_FLAGS = \ 349ef0b394Smrg $(XMLTO_SEARCHPATH_FLAGS) \ 359ef0b394Smrg $(XMLTO_HTML_STYLESHEET_FLAGS) \ 369ef0b394Smrg $(XMLTO_HTML_OLINK_FLAGS) 379ef0b394Smrg 389ef0b394Smrgshelf_DATA += $(docbook:.xml=.html) 399ef0b394Smrg%.html: %.xml $(chapters) 409ef0b394Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< 419ef0b394Smrg 429ef0b394Smrgif HAVE_XMLTO_TEXT 439ef0b394Smrg 449ef0b394Smrgshelf_DATA += $(docbook:.xml=.txt) 459ef0b394Smrg%.txt: %.xml $(chapters) 469ef0b394Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< 479ef0b394Smrgendif HAVE_XMLTO_TEXT 489ef0b394Smrg 499ef0b394Smrgif HAVE_FOP 509ef0b394SmrgXMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/ 519ef0b394SmrgXMLTO_PDF_OLINK_FLAGS = \ 529ef0b394Smrg --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \ 539ef0b394Smrg --stringparam current.docid="$(<:.xml=)" 549ef0b394SmrgXMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl 559ef0b394Smrg 569ef0b394SmrgXMLTO_FO_FLAGS = \ 579ef0b394Smrg $(XMLTO_SEARCHPATH_FLAGS) \ 589ef0b394Smrg $(XMLTO_FO_STYLESHEET_FLAGS) \ 599ef0b394Smrg $(XMLTO_FO_IMAGEPATH_FLAGS) \ 609ef0b394Smrg $(XMLTO_PDF_OLINK_FLAGS) 619ef0b394Smrg 629ef0b394Smrgshelf_DATA += $(docbook:.xml=.pdf) 639ef0b394Smrg%.pdf: %.xml $(chapters) 649ef0b394Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< 659ef0b394Smrg 669ef0b394Smrgshelf_DATA += $(docbook:.xml=.ps) 679ef0b394Smrg%.ps: %.xml $(chapters) 689ef0b394Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< 699ef0b394Smrgendif HAVE_FOP 709ef0b394Smrg 719ef0b394Smrg# Generate documents cross-reference target databases 729ef0b394Smrgif HAVE_XSLTPROC 739ef0b394Smrg 749ef0b394SmrgXSLT_SEARCHPATH_FLAGS = \ 759ef0b394Smrg --path "$(XORG_SGML_PATH)/X11" \ 769ef0b394Smrg --path "$(abs_top_builddir)" 779ef0b394SmrgXSLT_OLINK_FLAGS = \ 789ef0b394Smrg --stringparam targets.filename "$@" \ 799ef0b394Smrg --stringparam collect.xref.targets "only" \ 809ef0b394Smrg --stringparam olink.base.uri "$(@:.db=)" 819ef0b394Smrg 829ef0b394SmrgXSLT_HTML_FLAGS = \ 839ef0b394Smrg $(XSLT_SEARCHPATH_FLAGS) \ 849ef0b394Smrg $(XSLT_OLINK_FLAGS) \ 859ef0b394Smrg --nonet --xinclude \ 869ef0b394Smrg $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl 879ef0b394SmrgXSLT_PDF_FLAGS = \ 889ef0b394Smrg $(XSLT_SEARCHPATH_FLAGS) \ 899ef0b394Smrg $(XSLT_OLINK_FLAGS) \ 909ef0b394Smrg --nonet --xinclude \ 919ef0b394Smrg $(STYLESHEET_SRCDIR)/xorg-fo.xsl 929ef0b394Smrg 939ef0b394Smrgshelf_DATA += $(docbook:.xml=.html.db) 949ef0b394Smrg%.html.db: %.xml $(chapters) 959ef0b394Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $< 969ef0b394Smrg 979ef0b394Smrgshelf_DATA += $(docbook:.xml=.pdf.db) 989ef0b394Smrg%.pdf.db: %.xml $(chapters) 999ef0b394Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $< 1009ef0b394Smrg 1019ef0b394Smrgendif HAVE_XSLTPROC 1029ef0b394Smrgendif HAVE_STYLESHEETS 1039ef0b394Smrgendif HAVE_XMLTO 1049ef0b394Smrg 1059ef0b394SmrgCLEANFILES = $(shelf_DATA) 106