docbook.am revision 57f47464
157f47464Smrg# 257f47464Smrg# Generate output formats for a single DocBook/XML with/without chapters 357f47464Smrg# 457f47464Smrg# Variables set by the calling Makefile: 557f47464Smrg# shelfdir: the location where the docs/specs are installed. Typically $(docdir) 657f47464Smrg# docbook: the main DocBook/XML file, no chapters, appendix or image files 757f47464Smrg# chapters: all files pulled in by an XInclude statement and images. 857f47464Smrg# 957f47464Smrg 1057f47464Smrg# 1157f47464Smrg# This makefile is intended for Users Documentation and Functional Specifications. 1257f47464Smrg# Do not use for Developer Documentation which is not installed and does not require olink. 1357f47464Smrg# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 1457f47464Smrg# for an explanation on documents classification. 1557f47464Smrg# 1657f47464Smrg 1757f47464Smrg# DocBook/XML generated output formats to be installed 1857f47464Smrgshelf_DATA = 1957f47464Smrg 2057f47464Smrg# DocBook/XML file with chapters, appendix and images it includes 2157f47464Smrgdist_shelf_DATA = $(docbook) $(chapters) 2257f47464Smrg 2357f47464Smrg# 2457f47464Smrg# Generate DocBook/XML output formats with or without stylesheets 2557f47464Smrg# 2657f47464Smrg 2757f47464Smrg# Stylesheets are available if the package xorg-sgml-doctools is installed 2857f47464Smrgif HAVE_STYLESHEETS 2957f47464Smrg 3057f47464Smrg# The location where all cross reference databases are installed 3157f47464Smrgsgmldbsdir = $(XORG_SGML_PATH)/X11/dbs 3257f47464Smrgmasterdb = "$(sgmldbsdir)/masterdb$(suffix $@).xml" 3357f47464SmrgXMLTO_FLAGS = \ 3457f47464Smrg --searchpath "$(XORG_SGML_PATH)/X11" \ 3557f47464Smrg --stringparam target.database.document=$(masterdb) \ 3657f47464Smrg --stringparam current.docid="$(<:.xml=)" \ 3757f47464Smrg --stringparam collect.xref.targets="no" 3857f47464Smrg 3957f47464SmrgXMLTO_XHTML_FLAGS = \ 4057f47464Smrg -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl \ 4157f47464Smrg --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css 4257f47464Smrg 4357f47464SmrgXMLTO_FO_FLAGS = \ 4457f47464Smrg -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl 4557f47464Smrgendif HAVE_STYLESHEETS 4657f47464Smrg 4757f47464Smrgshelf_DATA += $(docbook:.xml=.html) 4857f47464Smrg%.html: %.xml $(chapters) 4957f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) xhtml-nochunks $< 5057f47464Smrg 5157f47464Smrgif HAVE_FOP 5257f47464Smrgshelf_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps) 5357f47464Smrg%.pdf: %.xml $(chapters) 5457f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop pdf $< 5557f47464Smrg%.ps: %.xml $(chapters) 5657f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop ps $< 5757f47464Smrgendif HAVE_FOP 5857f47464Smrg 5957f47464Smrgif HAVE_XMLTO_TEXT 6057f47464Smrgshelf_DATA += $(docbook:.xml=.txt) 6157f47464Smrg%.txt: %.xml $(chapters) 6257f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) txt $< 6357f47464Smrgendif HAVE_XMLTO_TEXT 6457f47464Smrg 6557f47464Smrg# 6657f47464Smrg# Generate documents cross-reference target databases 6757f47464Smrg# 6857f47464Smrg 6957f47464Smrg# This is only possible if the xorg-sgml-doctools package is installed 7057f47464Smrgif HAVE_STYLESHEETS 7157f47464Smrgif HAVE_XSLTPROC 7257f47464Smrg 7357f47464Smrg# DocBook/XML generated document cross-reference database 7457f47464Smrgsgmldbs_DATA = $(docbook:.xml=.html.db) $(docbook:.xml=.fo.db) 7557f47464Smrg 7657f47464Smrg# Generate DocBook/XML document cross-reference database 7757f47464Smrg# Flags for the XSL Transformation processor generating xref target databases 7857f47464SmrgXSLTPROC_FLAGS = \ 7957f47464Smrg --path "$(XORG_SGML_PATH)/X11" \ 8057f47464Smrg --stringparam targets.filename "$@" \ 8157f47464Smrg --stringparam collect.xref.targets "only" \ 8257f47464Smrg --nonet --xinclude 8357f47464Smrg 8457f47464Smrg%.html.db: %.xml $(chapters) 8557f47464Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \ 8657f47464Smrg http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< 8757f47464Smrg 8857f47464Smrg%.fo.db: %.xml $(chapters) 8957f47464Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \ 9057f47464Smrg http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $< 9157f47464Smrg 9257f47464Smrgendif HAVE_XSLTPROC 9357f47464Smrgendif HAVE_STYLESHEETS 9457f47464Smrg 9557f47464SmrgCLEANFILES = $(shelf_DATA) $(sgmldbs_DATA) 96