1 #
2 # Generate output formats for a single DocBook/XML with/without chapters
3 #
4 # Variables set by the calling Makefile:
5 # noinst_DATA: developers docs are not installed
6 # docbook: the main DocBook/XML file, no chapters, appendix or image files
7 # chapters: all files pulled in by an XInclude statement and images.
8 #
10 #
11 # This makefile is intended for Developers Documentation and is not installed.
12 # Do not use for Users docs or Specs which need to be installed and require olink support
13 # Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
14 # for an explanation on documents classification.
15 #
17 # Developers documnetation is not installed
18 noinst_DATA =
20 # DocBook/XML file with chapters, appendix and images it includes
21 dist_noinst_DATA = $(docbook) $(chapters)
23 #
24 # Generate DocBook/XML output formats with or without stylesheets
25 #
27 # Stylesheets are available if the package xorg-sgml-doctools is installed
28 if HAVE_STYLESHEETS
30 # The location where all cross reference databases are installed
31 XMLTO_FLAGS = \
32 --searchpath "$(XORG_SGML_PATH)/X11" \
33 --searchpath "$(abs_top_builddir)" \
34 --stringparam current.docid="$(<:.xml=)"
36 XMLTO_XHTML_FLAGS = \
37 -m $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl \
38 --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
40 XMLTO_FO_FLAGS = \
41 -m $(STYLESHEET_SRCDIR)/xorg-fo.xsl
42 endif HAVE_STYLESHEETS
44 noinst_DATA += $(docbook:.xml=.html)
45 %.html: %.xml $(chapters)
46 $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) xhtml-nochunks $<
48 if HAVE_FOP
49 noinst_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
50 %.pdf: %.xml $(chapters)
51 $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop pdf $<
52 %.ps: %.xml $(chapters)
53 $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop ps $<
54 endif HAVE_FOP
56 if HAVE_XMLTO_TEXT
57 noinst_DATA += $(docbook:.xml=.txt)
58 %.txt: %.xml $(chapters)
59 $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) txt $<
60 endif HAVE_XMLTO_TEXT
62 CLEANFILES = $(noinst_DATA)