2 # Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
5 CLEANFILES = Linux-PAM_ADG.fo *~
9 XMLS = Linux-PAM_ADG.xml $(shell ls $(srcdir)/pam_*.xml)
10 DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml)
12 if ENABLE_REGENERATE_MAN
13 MAINTAINERCLEANFILES = Linux-PAM_ADG.txt Linux-PAM_ADG.pdf html/*.html
15 all: Linux-PAM_ADG.txt html/Linux-PAM_ADG.html Linux-PAM_ADG.pdf
17 Linux-PAM_ADG.pdf: $(XMLS) $(DEP_XMLS)
18 if ENABLE_GENERATE_PDF
19 $(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
20 $(XSLTPROC) --stringparam generate.toc "book toc" \
21 --stringparam section.autolabel 1 \
22 --stringparam section.label.includes.component.label 1 \
23 --stringparam toc.max.depth 3 --xinclude --nonet \
24 http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $< > Linux-PAM_ADG.fo
25 $(FO2PDF) Linux-PAM_ADG.fo $@
27 echo "No fo2pdf processor installed, skip PDF generation"
30 Linux-PAM_ADG.txt: $(XMLS) $(DEP_XMLS)
31 $(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
32 $(XSLTPROC) --stringparam generate.toc "book toc" \
33 --stringparam section.autolabel 1 \
34 --stringparam section.label.includes.component.label 1 \
35 --stringparam toc.max.depth 3 --xinclude --nonet \
36 http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< | $(BROWSER) > $@
38 html/Linux-PAM_ADG.html: $(XMLS) $(DEP_XMLS)
39 @test -d html || mkdir -p html
40 $(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
41 $(XSLTPROC) --stringparam base.dir html/ \
42 --stringparam root.filename Linux-PAM_ADG \
43 --stringparam use.id.as.filename 1 \
44 --stringparam chunk.first.sections 1 \
45 --stringparam section.autolabel 1 \
46 --stringparam section.label.includes.component.label 1 \
47 --stringparam toc.max.depth 3 --xinclude --nonet \
48 http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
51 -rm -rf html Linux-PAM_ADG.txt Linux-PAM_ADG.pdf
56 $(mkinstalldirs) $(DESTDIR)$(docdir)
57 $(mkinstalldirs) $(DESTDIR)$(pdfdir)
58 $(mkinstalldirs) $(DESTDIR)$(htmldir)
59 test -f html/Linux-PAM_ADG.html || exit 0; \
60 $(install_sh_DATA) html/Linux-PAM_ADG.html html/adg-*.html \
61 $(DESTDIR)$(htmldir)/ || \
62 $(install_sh_DATA) $(srcdir)/html/Linux-PAM_ADG.html \
63 $(srcdir)/html/sag-*.html \
65 test -f Linux-PAM_ADG.txt || exit 0; \
66 $(install_sh_DATA) Linux-PAM_ADG.txt $(DESTDIR)$(docdir)/ || \
67 $(install_sh_DATA) $(srcdir)/Linux-PAM_ADG.txt \
69 test -f Linux-PAM_ADG.pdf || exit 0; \
70 $(install_sh_DATA) Linux-PAM_ADG.pdf $(DESTDIR)$(pdfdir)/ || \
71 $(install_sh_DATA) $(srcdir)/Linux-PAM_ADG.pdf \
75 -rm $(DESTDIR)$(htmldir)/Linux-PAM_ADG.html
76 -rm $(DESTDIR)$(htmldir)/adg-*.html
77 -rm $(DESTDIR)$(docdir)/Linux-PAM_ADG.txt
78 -rm $(DESTDIR)$(pdfdir)/Linux-PAM_ADG.pdf
81 $(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html
82 test -f html/Linux-PAM_ADG.html || exit 0; \
83 cp -ap html/Linux-PAM_ADG.html html/adg-*.html \
84 $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html/ || \
85 cp -ap $(srcdir)/html/Linux-PAM_ADG.html \
86 $(srcdir)/html/adg-*.html \
87 $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/html/
88 test -f Linux-PAM_ADG.txt || exit 0; \
89 cp -p Linux-PAM_ADG.txt \
90 $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/ || \
91 cp -p $(srcdir)/Linux-PAM_ADG.txt \
92 $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/
93 test -f Linux-PAM_ADG.pdf || exit 0; \
94 cp -p Linux-PAM_ADG.pdf \
95 $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/ || \
96 cp -p $(srcdir)/Linux-PAM_ADG.pdf \
97 $(top_builddir)/Linux-PAM-$(VERSION)/doc/adg/