2011-05-30 14:52:47 -06:00
|
|
|
#
|
|
|
|
# Generate output formats for a single DocBook/XML with/without chapters
|
|
|
|
#
|
|
|
|
# Variables set by the calling Makefile:
|
|
|
|
# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
|
|
|
|
# docbook: the main DocBook/XML file, no chapters, appendix or image files
|
|
|
|
# chapters: all files pulled in by an XInclude statement and images.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# This makefile is intended for Users Documentation and Functional Specifications.
|
|
|
|
# Do not use for Developer Documentation which is not installed and does not require olink.
|
|
|
|
# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
|
|
|
|
# for an explanation on documents classification.
|
|
|
|
#
|
|
|
|
|
|
|
|
# DocBook/XML generated output formats to be installed
|
|
|
|
shelf_DATA =
|
|
|
|
|
|
|
|
# DocBook/XML file with chapters, appendix and images it includes
|
|
|
|
dist_shelf_DATA = $(docbook) $(chapters)
|
|
|
|
|
2011-08-27 09:34:14 -06:00
|
|
|
if HAVE_XMLTO
|
2011-05-30 14:52:47 -06:00
|
|
|
if HAVE_STYLESHEETS
|
|
|
|
|
2012-03-27 13:19:37 -06:00
|
|
|
XMLTO_SEARCHPATH_FLAGS = \
|
|
|
|
--searchpath "$(XORG_SGML_PATH)/X11" \
|
|
|
|
--searchpath "$(abs_top_builddir)"
|
|
|
|
XMLTO_HTML_OLINK_FLAGS = \
|
|
|
|
--stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
|
|
|
|
--stringparam current.docid="$(<:.xml=)"
|
|
|
|
XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
|
|
|
|
XMLTO_HTML_FLAGS = \
|
|
|
|
$(XMLTO_SEARCHPATH_FLAGS) \
|
|
|
|
$(XMLTO_HTML_STYLESHEET_FLAGS) \
|
|
|
|
$(XMLTO_HTML_OLINK_FLAGS)
|
2011-05-30 14:52:47 -06:00
|
|
|
|
|
|
|
shelf_DATA += $(docbook:.xml=.html)
|
2012-03-27 13:19:37 -06:00
|
|
|
%.html: %.xml $(chapters)
|
|
|
|
$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
|
2011-05-30 14:52:47 -06:00
|
|
|
|
|
|
|
if HAVE_XMLTO_TEXT
|
2012-03-27 13:19:37 -06:00
|
|
|
|
2011-05-30 14:52:47 -06:00
|
|
|
shelf_DATA += $(docbook:.xml=.txt)
|
|
|
|
%.txt: %.xml $(chapters)
|
2012-03-27 13:19:37 -06:00
|
|
|
$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
|
2011-05-30 14:52:47 -06:00
|
|
|
endif HAVE_XMLTO_TEXT
|
|
|
|
|
2012-03-27 13:19:37 -06:00
|
|
|
if HAVE_FOP
|
|
|
|
XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
|
|
|
|
XMLTO_PDF_OLINK_FLAGS = \
|
|
|
|
--stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
|
|
|
|
--stringparam current.docid="$(<:.xml=)"
|
|
|
|
XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
|
|
|
|
|
|
|
|
XMLTO_FO_FLAGS = \
|
|
|
|
$(XMLTO_SEARCHPATH_FLAGS) \
|
|
|
|
$(XMLTO_FO_STYLESHEET_FLAGS) \
|
|
|
|
$(XMLTO_FO_IMAGEPATH_FLAGS) \
|
|
|
|
$(XMLTO_PDF_OLINK_FLAGS)
|
|
|
|
|
|
|
|
shelf_DATA += $(docbook:.xml=.pdf)
|
|
|
|
%.pdf: %.xml $(chapters)
|
|
|
|
$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
|
2011-05-30 14:52:47 -06:00
|
|
|
|
2012-03-27 13:19:37 -06:00
|
|
|
shelf_DATA += $(docbook:.xml=.ps)
|
|
|
|
%.ps: %.xml $(chapters)
|
|
|
|
$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
|
|
|
|
endif HAVE_FOP
|
2011-05-30 14:52:47 -06:00
|
|
|
|
2012-03-27 13:19:37 -06:00
|
|
|
# Generate documents cross-reference target databases
|
|
|
|
if HAVE_XSLTPROC
|
2011-05-30 14:52:47 -06:00
|
|
|
|
2012-03-27 13:19:37 -06:00
|
|
|
XSLT_SEARCHPATH_FLAGS = \
|
2011-05-30 14:52:47 -06:00
|
|
|
--path "$(XORG_SGML_PATH)/X11" \
|
2012-03-27 13:19:37 -06:00
|
|
|
--path "$(abs_top_builddir)"
|
|
|
|
XSLT_OLINK_FLAGS = \
|
|
|
|
--stringparam targets.filename "$@" \
|
|
|
|
--stringparam collect.xref.targets "only" \
|
|
|
|
--stringparam olink.base.uri "$(@:.db=)"
|
|
|
|
|
|
|
|
XSLT_HTML_FLAGS = \
|
|
|
|
$(XSLT_SEARCHPATH_FLAGS) \
|
|
|
|
$(XSLT_OLINK_FLAGS) \
|
|
|
|
--nonet --xinclude \
|
|
|
|
$(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
|
|
|
|
XSLT_PDF_FLAGS = \
|
|
|
|
$(XSLT_SEARCHPATH_FLAGS) \
|
|
|
|
$(XSLT_OLINK_FLAGS) \
|
|
|
|
--nonet --xinclude \
|
|
|
|
$(STYLESHEET_SRCDIR)/xorg-fo.xsl
|
|
|
|
|
|
|
|
shelf_DATA += $(docbook:.xml=.html.db)
|
2011-05-30 14:52:47 -06:00
|
|
|
%.html.db: %.xml $(chapters)
|
2012-03-27 13:19:37 -06:00
|
|
|
$(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
|
2011-05-30 14:52:47 -06:00
|
|
|
|
2012-03-27 13:19:37 -06:00
|
|
|
shelf_DATA += $(docbook:.xml=.pdf.db)
|
|
|
|
%.pdf.db: %.xml $(chapters)
|
|
|
|
$(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
|
2011-05-30 14:52:47 -06:00
|
|
|
|
|
|
|
endif HAVE_XSLTPROC
|
|
|
|
endif HAVE_STYLESHEETS
|
2011-08-27 09:34:14 -06:00
|
|
|
endif HAVE_XMLTO
|
2011-05-30 14:52:47 -06:00
|
|
|
|
2011-08-27 09:34:14 -06:00
|
|
|
CLEANFILES = $(shelf_DATA)
|