xref: /OK3568_Linux_fs/external/xserver/devbook.am (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# Generate output formats for a single DocBook/XML with/without chapters
3*4882a593Smuzhiyun#
4*4882a593Smuzhiyun# Variables set by the calling Makefile:
5*4882a593Smuzhiyun# noinst_DATA: developers docs are not installed
6*4882a593Smuzhiyun# docbook:  the main DocBook/XML file, no chapters, appendix or image files
7*4882a593Smuzhiyun# chapters: all files pulled in by an XInclude statement and images.
8*4882a593Smuzhiyun#
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun#
11*4882a593Smuzhiyun# This makefile is intended for Developers Documentation and is not installed.
12*4882a593Smuzhiyun# Do not use for Users docs or Specs which need to be installed and require olink support
13*4882a593Smuzhiyun# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
14*4882a593Smuzhiyun# for an explanation on documents classification.
15*4882a593Smuzhiyun#
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun# Developers documnetation is not installed
18*4882a593Smuzhiyunnoinst_DATA =
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun# DocBook/XML file with chapters, appendix and images it includes
21*4882a593Smuzhiyundist_noinst_DATA = $(docbook) $(chapters)
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunFILTER_XMLTO=$(SHELL) $(top_srcdir)/doc/filter-xmlto.sh $(XMLTO)
24*4882a593Smuzhiyun
25*4882a593Smuzhiyunif HAVE_STYLESHEETS
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunXMLTO_HTML_FLAGS = 					\
28*4882a593Smuzhiyun	--searchpath "$(XORG_SGML_PATH)/X11" 		\
29*4882a593Smuzhiyun	--searchpath "$(abs_top_builddir)"		\
30*4882a593Smuzhiyun	-x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
31*4882a593Smuzhiyun
32*4882a593Smuzhiyunnoinst_DATA += $(docbook:.xml=.html)
33*4882a593Smuzhiyun%.html: %.xml  $(chapters)
34*4882a593Smuzhiyun	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
35*4882a593Smuzhiyun
36*4882a593Smuzhiyunif HAVE_XMLTO_TEXT
37*4882a593Smuzhiyunnoinst_DATA += $(docbook:.xml=.txt)
38*4882a593Smuzhiyun%.txt: %.xml $(chapters)
39*4882a593Smuzhiyun	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) txt $<
40*4882a593Smuzhiyunendif HAVE_XMLTO_TEXT
41*4882a593Smuzhiyun
42*4882a593Smuzhiyunif HAVE_FOP
43*4882a593SmuzhiyunXMLTO_FO_FLAGS = 					\
44*4882a593Smuzhiyun	--searchpath "$(XORG_SGML_PATH)/X11" 		\
45*4882a593Smuzhiyun	--searchpath "$(abs_top_builddir)"		\
46*4882a593Smuzhiyun	--stringparam img.src.path=$(abs_builddir)/	\
47*4882a593Smuzhiyun	-x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunnoinst_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
50*4882a593Smuzhiyun%.pdf: %.xml $(chapters)
51*4882a593Smuzhiyun	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
52*4882a593Smuzhiyun%.ps: %.xml $(chapters)
53*4882a593Smuzhiyun	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
54*4882a593Smuzhiyunendif HAVE_FOP
55*4882a593Smuzhiyunendif HAVE_STYLESHEETS
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunCLEANFILES = $(noinst_DATA)
58