summaryrefslogtreecommitdiff
path: root/doc/mwg/Makefile.am
blob: 77296189651b00fe29ac9297db1d49c4dc73806a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
# Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
#

CLEANFILES = Linux-PAM_MWG.fo *~

EXTRA_DIST = $(XMLS)

XMLS = Linux-PAM_MWG.xml $(shell ls $(srcdir)/pam_*.xml)
DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml)

if ENABLE_REGENERATE_MAN
MAINTAINERCLEANFILES = Linux-PAM_MWG.txt Linux-PAM_MWG.pdf html/*.html

all: Linux-PAM_MWG.txt html/Linux-PAM_MWG.html Linux-PAM_MWG.pdf

Linux-PAM_MWG.pdf: $(XMLS) $(DEP_XMLS)
if ENABLE_GENERATE_PDF
	$(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
	$(XSLTPROC) --stringparam generate.toc "book toc" \
	  --stringparam section.autolabel 1 \
	  --stringparam section.label.includes.component.label 1 \
	  --stringparam toc.max.depth 3 --xinclude --nonet \
	http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $< > Linux-PAM_MWG.fo
	$(FO2PDF) Linux-PAM_MWG.fo $@
else
	echo "No fo2pdf processor installed, skip PDF generation"
endif

Linux-PAM_MWG.txt: $(XMLS) $(DEP_XMLS)
	$(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
	$(XSLTPROC) --stringparam generate.toc "book toc" \
	  --stringparam section.autolabel 1 \
	  --stringparam section.label.includes.component.label 1 \
	  --stringparam toc.max.depth 3 --xinclude --nonet \
	  http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< | $(BROWSER) > $@

html/Linux-PAM_MWG.html: $(XMLS) $(DEP_XMLS)
	@test -d html || mkdir -p html
	$(XMLLINT) --nonet --xinclude --postvalid --noent --noout $<
	$(XSLTPROC) --stringparam base.dir html/ \
	  --stringparam root.filename Linux-PAM_MWG \
	  --stringparam use.id.as.filename 1 \
	  --stringparam chunk.first.sections 1 \
	  --stringparam section.autolabel 1 \
	  --stringparam section.label.includes.component.label 1 \
	  --stringparam toc.max.depth 3 --xinclude --nonet \
	  http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<

distclean-local:
	-rm -rf html Linux-PAM_MWG.txt Linux-PAM_MWG.pdf

endif

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(docdir)
	$(mkinstalldirs) $(DESTDIR)$(pdfdir)
	$(mkinstalldirs) $(DESTDIR)$(htmldir)
	test -f html/Linux-PAM_MWG.html || exit 0; \
	    $(install_sh_DATA) html/Linux-PAM_MWG.html html/mwg-*.html \
		$(DESTDIR)$(htmldir)/ || \
	    $(install_sh_DATA) $(srcdir)/html/Linux-PAM_MWG.html \
		$(srcdir)/html/sag-*.html \
		$(DESTDIR)$(htmldir)/
	test -f Linux-PAM_MWG.txt || exit 0; \
	    $(install_sh_DATA) Linux-PAM_MWG.txt $(DESTDIR)$(docdir)/ || \
	    $(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.txt \
		$(DESTDIR)$(docdir)/
	test -f Linux-PAM_MWG.pdf || exit 0; \
	    $(install_sh_DATA) Linux-PAM_MWG.pdf $(DESTDIR)$(pdfdir)/ || \
	    $(install_sh_DATA) $(srcdir)/Linux-PAM_MWG.pdf \
		$(DESTDIR)$(pdfdir)/

uninstall-local:
	-rm $(DESTDIR)$(htmldir)/Linux-PAM_MWG.html
	-rm $(DESTDIR)$(htmldir)/mwg-*.html
	-rm $(DESTDIR)$(docdir)/Linux-PAM_MWG.txt
	-rm $(DESTDIR)$(pdfdir)/Linux-PAM_MWG.pdf

releasedocs: all
	$(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html
	test -f html/Linux-PAM_MWG.html || exit 0; \
	    cp -ap html/Linux-PAM_MWG.html html/mwg-*.html \
		$(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/ || \
	    cp -ap $(srcdir)/html/Linux-PAM_MWG.html \
		$(srcdir)/html/mwg-*.html \
		$(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/html/
	test -f Linux-PAM_MWG.txt || exit 0; \
	    cp -p Linux-PAM_MWG.txt \
		$(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/ || \
	    cp -p $(srcdir)/Linux-PAM_MWG.txt \
		$(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/
	test -f Linux-PAM_MWG.pdf || exit 0; \
	    cp -p Linux-PAM_MWG.pdf \
		$(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/ || \
	    cp -p $(srcdir)/Linux-PAM_MWG.pdf \
		$(top_builddir)/Linux-PAM-$(VERSION)/doc/mwg/