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