docbook.am revision 6cc2b21f
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 236cc2b21fSmrgif HAVE_XMLTO 2457f47464Smrg# 2557f47464Smrg# Generate DocBook/XML output formats with or without stylesheets 2657f47464Smrg# 2757f47464Smrg 2857f47464Smrg# Stylesheets are available if the package xorg-sgml-doctools is installed 2957f47464Smrgif HAVE_STYLESHEETS 3057f47464Smrg 3157f47464Smrg# The location where all cross reference databases are installed 3257f47464Smrgsgmldbsdir = $(XORG_SGML_PATH)/X11/dbs 3357f47464Smrgmasterdb = "$(sgmldbsdir)/masterdb$(suffix $@).xml" 3457f47464SmrgXMLTO_FLAGS = \ 3557f47464Smrg --searchpath "$(XORG_SGML_PATH)/X11" \ 3657f47464Smrg --stringparam target.database.document=$(masterdb) \ 3757f47464Smrg --stringparam current.docid="$(<:.xml=)" \ 3857f47464Smrg --stringparam collect.xref.targets="no" 3957f47464Smrg 4057f47464SmrgXMLTO_XHTML_FLAGS = \ 4157f47464Smrg -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl \ 4257f47464Smrg --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css 4357f47464Smrg 4457f47464SmrgXMLTO_FO_FLAGS = \ 4557f47464Smrg -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl 4657f47464Smrgendif HAVE_STYLESHEETS 4757f47464Smrg 4857f47464Smrgshelf_DATA += $(docbook:.xml=.html) 4957f47464Smrg%.html: %.xml $(chapters) 5057f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) xhtml-nochunks $< 5157f47464Smrg 5257f47464Smrgif HAVE_FOP 5357f47464Smrgshelf_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps) 5457f47464Smrg%.pdf: %.xml $(chapters) 5557f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop pdf $< 5657f47464Smrg%.ps: %.xml $(chapters) 5757f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop ps $< 5857f47464Smrgendif HAVE_FOP 5957f47464Smrg 6057f47464Smrgif HAVE_XMLTO_TEXT 6157f47464Smrgshelf_DATA += $(docbook:.xml=.txt) 6257f47464Smrg%.txt: %.xml $(chapters) 6357f47464Smrg $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) txt $< 6457f47464Smrgendif HAVE_XMLTO_TEXT 6557f47464Smrg 6657f47464Smrg# 6757f47464Smrg# Generate documents cross-reference target databases 6857f47464Smrg# 6957f47464Smrg 7057f47464Smrg# This is only possible if the xorg-sgml-doctools package is installed 7157f47464Smrgif HAVE_STYLESHEETS 7257f47464Smrgif HAVE_XSLTPROC 7357f47464Smrg 7457f47464Smrg# DocBook/XML generated document cross-reference database 756cc2b21fSmrgshelf_DATA += $(docbook:.xml=.html.db) $(docbook:.xml=.fo.db) 7657f47464Smrg 7757f47464Smrg# Generate DocBook/XML document cross-reference database 7857f47464Smrg# Flags for the XSL Transformation processor generating xref target databases 7957f47464SmrgXSLTPROC_FLAGS = \ 8057f47464Smrg --path "$(XORG_SGML_PATH)/X11" \ 8157f47464Smrg --stringparam targets.filename "$@" \ 8257f47464Smrg --stringparam collect.xref.targets "only" \ 8357f47464Smrg --nonet --xinclude 8457f47464Smrg 8557f47464Smrg%.html.db: %.xml $(chapters) 8657f47464Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \ 8757f47464Smrg http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< 8857f47464Smrg 8957f47464Smrg%.fo.db: %.xml $(chapters) 9057f47464Smrg $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \ 9157f47464Smrg http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $< 9257f47464Smrg 9357f47464Smrgendif HAVE_XSLTPROC 9457f47464Smrgendif HAVE_STYLESHEETS 956cc2b21fSmrgendif HAVE_XMLTO 9657f47464Smrg 976cc2b21fSmrgCLEANFILES = $(shelf_DATA) 98