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#
9
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#
16
17# Developers documnetation is not installed
18noinst_DATA =
19
20# DocBook/XML file with chapters, appendix and images it includes
21dist_noinst_DATA = $(docbook) $(chapters)
22
23FILTER_XMLTO=$(SHELL) $(top_srcdir)/doc/filter-xmlto.sh $(XMLTO)
24
25if HAVE_STYLESHEETS
26
27XMLTO_HTML_FLAGS = 					\
28	--searchpath "$(XORG_SGML_PATH)/X11" 		\
29	--searchpath "$(abs_top_builddir)"		\
30	-x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
31
32noinst_DATA += $(docbook:.xml=.html)
33%.html: %.xml  $(chapters)
34	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
35
36if HAVE_XMLTO_TEXT
37noinst_DATA += $(docbook:.xml=.txt)
38%.txt: %.xml $(chapters)
39	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) txt $<
40endif HAVE_XMLTO_TEXT
41
42if HAVE_FOP
43XMLTO_FO_FLAGS = 					\
44	--searchpath "$(XORG_SGML_PATH)/X11" 		\
45	--searchpath "$(abs_top_builddir)"		\
46	--stringparam img.src.path=$(abs_builddir)/	\
47	-x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
48
49noinst_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
50%.pdf: %.xml $(chapters)
51	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
52%.ps: %.xml $(chapters)
53	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
54endif HAVE_FOP
55endif HAVE_STYLESHEETS
56
57CLEANFILES = $(noinst_DATA)
58