devbook.am revision a96d7823
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
23if HAVE_STYLESHEETS
24
25XMLTO_HTML_FLAGS = 					\
26	--searchpath "$(XORG_SGML_PATH)/X11" 		\
27	--searchpath "$(abs_top_builddir)"		\
28	-x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
29
30noinst_DATA += $(docbook:.xml=.html)
31%.html: %.xml  $(chapters)
32	$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
33
34if HAVE_XMLTO_TEXT
35noinst_DATA += $(docbook:.xml=.txt)
36%.txt: %.xml $(chapters)
37	$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
38endif HAVE_XMLTO_TEXT
39
40if HAVE_FOP
41XMLTO_FO_FLAGS = 					\
42	--searchpath "$(XORG_SGML_PATH)/X11" 		\
43	--searchpath "$(abs_top_builddir)"		\
44	--stringparam img.src.path=$(abs_builddir)/	\
45	-x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
46
47noinst_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
48%.pdf: %.xml $(chapters)
49	$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
50%.ps: %.xml $(chapters)
51	$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
52endif HAVE_FOP
53endif HAVE_STYLESHEETS
54
55CLEANFILES = $(noinst_DATA)
56