Import Linux-PAM.
[profile/ivi/pam.git] / doc / mwg / Makefile.am
1 #
2 # Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
3 #
4
5 CLEANFILES = Linux-PAM_MWG.fo *~
6
7 EXTRA_DIST = $(XMLS)
8
9 XMLS = Linux-PAM_MWG.xml $(shell ls $(srcdir)/pam_*.xml)
10 DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml)
11
12 if ENABLE_REGENERATE_MAN
13 MAINTAINERCLEANFILES = Linux-PAM_MWG.txt Linux-PAM_MWG.pdf html/*.html
14
15 all: Linux-PAM_MWG.txt html/Linux-PAM_MWG.html Linux-PAM_MWG.pdf
16
17 Linux-PAM_MWG.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_MWG.fo
25         $(FO2PDF) Linux-PAM_MWG.fo $@
26 else
27         echo "No fo2pdf processor installed, skip PDF generation"
28 endif
29
30 Linux-PAM_MWG.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) > $@
37
38 html/Linux-PAM_MWG.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_MWG \
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           --stringparam chunker.output.encoding UTF-8 \
49           http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
50
51 distclean-local:
52         -rm -rf html Linux-PAM_MWG.txt Linux-PAM_MWG.pdf
53
54 endif
55
56 install-data-local:
57         $(mkinstalldirs) $(DESTDIR)$(docdir)
58         $(mkinstalldirs) $(DESTDIR)$(pdfdir)
59         $(mkinstalldirs) $(DESTDIR)$(htmldir)
60         test -f html/Linux-PAM_MWG.html || exit 0; \
61             $(install_sh_DATA) html/Linux-PAM_MWG.html html/mwg-*.html \
62                 $(DESTDIR)$(htmldir)/ || \
63             $(install_sh_DATA) $(srcdir)/html/Linux-PAM_MWG.html \
64                 $(srcdir)/html/sag-*.html \
65                 $(DESTDIR)$(htmldir)/
66         test -f Linux-PAM_MWG.txt || exit 0; \
67             $(install_sh_DATA) Linux-PAM_MWG.txt $(DESTDIR)$(docdir)/ || \
68             $(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.txt \
69                 $(DESTDIR)$(docdir)/
70         test -f Linux-PAM_MWG.pdf || exit 0; \
71             $(install_sh_DATA) Linux-PAM_MWG.pdf $(DESTDIR)$(pdfdir)/ || \
72             $(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.pdf \
73                 $(DESTDIR)$(pdfdir)/
74
75 uninstall-local:
76         -rm $(DESTDIR)$(htmldir)/Linux-PAM_MWG.html
77         -rm $(DESTDIR)$(htmldir)/mwg-*.html
78         -rm $(DESTDIR)$(docdir)/Linux-PAM_MWG.txt
79         -rm $(DESTDIR)$(pdfdir)/Linux-PAM_MWG.pdf
80
81 releasedocs: all
82         $(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html
83         test -f html/Linux-PAM_MWG.html || exit 0; \
84             cp -ap html/Linux-PAM_MWG.html html/mwg-*.html \
85                 $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/ || \
86             cp -ap $(srcdir)/html/Linux-PAM_MWG.html \
87                 $(srcdir)/html/mwg-*.html \
88                 $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/
89         test -f Linux-PAM_MWG.txt || exit 0; \
90             cp -p Linux-PAM_MWG.txt \
91                 $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/ || \
92             cp -p $(srcdir)/Linux-PAM_MWG.txt \
93                 $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/
94         test -f Linux-PAM_MWG.pdf || exit 0; \
95             cp -p Linux-PAM_MWG.pdf \
96                 $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/ || \
97             cp -p $(srcdir)/Linux-PAM_MWG.pdf \
98                 $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/