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
--stringparam chunker.output.encoding UTF-8 \
50
http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
53
-rm -rf html Linux-PAM_SAG.txt Linux-PAM_SAG.pdf
57
$(mkinstalldirs) $(DESTDIR)$(docdir)
58
$(mkinstalldirs) $(DESTDIR)$(pdfdir)
59
$(mkinstalldirs) $(DESTDIR)$(htmldir)
60
test -f html/Linux-PAM_SAG.html || exit 0; \
61
$(install_sh_DATA) html/Linux-PAM_SAG.html html/sag-*.html \
62
$(DESTDIR)$(htmldir)/ || \
63
$(install_sh_DATA) $(srcdir)/html/Linux-PAM_SAG.html \
64
$(srcdir)/html/sag-*.html \
66
test -f Linux-PAM_SAG.txt || exit 0; \
67
$(install_sh_DATA) Linux-PAM_SAG.txt $(DESTDIR)$(docdir)/ || \
68
$(install_sh_DATA) $(srcdir)/Linux-PAM_SAG.txt \
70
test -f Linux-PAM_SAG.pdf || exit 0; \
71
$(install_sh_DATA) Linux-PAM_SAG.pdf $(DESTDIR)$(pdfdir)/ || \
72
$(install_sh_DATA) $(srcdir)/Linux-PAM_SAG.pdf \
76
-rm $(DESTDIR)$(htmldir)/Linux-PAM_SAG.html
77
-rm $(DESTDIR)$(htmldir)/sag-*.html
78
-rm $(DESTDIR)$(docdir)/Linux-PAM_SAG.txt
79
-rm $(DESTDIR)$(pdfdir)/Linux-PAM_SAG.pdf
82
$(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html
83
test -f html/Linux-PAM_SAG.html || exit 0; \
84
cp -ap html/Linux-PAM_SAG.html html/sag-*.html \
85
$(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html/ || \
86
cp -ap $(srcdir)/html/Linux-PAM_SAG.html \
87
$(srcdir)/html/sag-*.html \
88
$(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/html/
89
test -f Linux-PAM_SAG.txt || exit 0; \
90
cp -p Linux-PAM_SAG.txt \
91
$(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/ || \
92
cp -p $(srcdir)/Linux-PAM_SAG.txt \
93
$(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/
94
test -f Linux-PAM_SAG.pdf || exit 0; \
95
cp -p Linux-PAM_SAG.pdf \
96
$(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/ || \
97
cp -p $(srcdir)/Linux-PAM_SAG.pdf \
98
$(top_builddir)/Linux-PAM-$(VERSION)/doc/sag/