]> granicus.if.org Git - linux-pam/blob - doc/sag/Makefile.am
Relevant BUGIDs:
[linux-pam] / doc / sag / Makefile.am
1 #
2 # Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
3 #
4
5 CLEANFILES = Linux-PAM_SAG.fo *~
6
7 EXTRA_DIST = $(XMLS)
8
9 XMLS = Linux-PAM_SAG.xml $(shell ls $(srcdir)/pam_*.xml)
10
11 DEP_XMLS = $(shell ls $(top_srcdir)/modules/pam_*/pam_*.xml)
12
13 if ENABLE_REGENERATE_MAN
14 MAINTAINERCLEANFILES = Linux-PAM_SAG.txt Linux-PAM_SAG.pdf html/*.html
15
16 all: Linux-PAM_SAG.txt html/Linux-PAM_SAG.html Linux-PAM_SAG.pdf
17
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 $@
27 else
28         echo "No fo2pdf processor installed, skip PDF generation"
29 endif
30
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) > $@
38
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 $<
50
51 distclean-local:
52         -rm -rf html Linux-PAM_SAG.txt Linux-PAM_SAG.pdf
53 endif
54
55 install-data-local:
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 \
64                 $(DESTDIR)$(htmldir)/
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 \
68                 $(DESTDIR)$(docdir)/
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 \
72                 $(DESTDIR)$(pdfdir)/
73
74 uninstall-local:
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
79
80 releasedocs: all
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/