Debian Codegraph @

doc/doc.mk

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 userguide = doc/xmlstarlet-ug
2 userguide_gen = $(userguide).html
3 if HAVE_FOP
4 userguide_gen += $(userguide).pdf
5 if HAVE_PDF2PS
6 userguide_gen += $(userguide).ps
7 endif
8 endif
9 userguide_src = $(srcdir)/$(userguide).xml
10
11 txtguide = doc/xmlstarlet.txt
12 txtguide_src = $(srcdir)/doc/gen-doc
13
14 manpage = doc/xmlstarlet.1
15 manpage_src = $(srcdir)/doc/xmlstarlet-man.xml
16
17 generated_docs = $(userguide_gen) $(txtguide) $(manpage)
18 buildfiles_docs = $(srcdir)/doc/replace-PROG-VERSION.xsl $(srcdir)/doc/xmlstar-fodoc-style.xsl
19
20 DOCBOOK_PARAMS = \
21 --param section.autolabel 1 \
22 --stringparam generate.toc 'book toc,title'
23
24 EDIT_XML = $(XSLTPROC) \
25 --stringparam VERSION '$(VERSION)' \
26 --stringparam PROG "`echo xml | $(SED) '$(program_transform_name)'`" \
27 $(srcdir)/doc/replace-PROG-VERSION.xsl
28
29 if BUILD_DOCS
30
31 .xml.html:
32 $(V_DOCBOOK)$(EDIT_XML) $< | $(XSLTPROC) $(DOCBOOK_PARAMS) \
33 --stringparam html.stylesheet html.css \
34 http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl \
35 - > $@
36
37 .xml.fo:
38 $(V_DOCBOOK)$(EDIT_XML) $< | $(XSLTPROC) $(DOCBOOK_PARAMS) $(srcdir)/doc/xmlstar-fodoc-style.xsl - > $@
39
40 if HAVE_FOP
41 .fo.pdf:
42 $(V_FOP)$(FOP) -q $< $@
43 endif
44 if HAVE_PDF2PS
45 .pdf.ps:
46 $(AM_V_GEN)$(PDF2PS) $< $@
47 endif
48
49 $(userguide).html : $(userguide_src)
50
51 $(manpage): $(manpage_src)
52 $(V_DOCBOOK)$(EDIT_XML) $< | $(XSLTPROC) -o $@ \
53 http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl \
54 -
55
56 $(txtguide): $(txtguide_src) $(usage_texts)
57 $(AM_V_GEN)srcdir=$(srcdir) SED=$(SED) transform='$(program_transform_name)' $< ./xml > $@
58
59 clean-doc:
60 rm -f $(generated_docs)
61
62 endif BUILD_DOCS
63
64 # NOTE: if put inside "if BUILD_DOCS" automake issues a warning
65 .PHONY: clean-doc