1 # Makefile for amanda man-pages
7 AMPLOT_MAN_PAGES = amplot.8
9 COMMON_MAN_PAGES = amanda.8 \
11 amanda-client.conf.5 \
13 amanda-archive-format.5 \
21 amanda-applications.7 \
34 amanda-compatibility.7 \
36 amanda-interactivity.7 \
68 RECOVER_MAN_PAGES = amrecover.8
70 RESTORE_MAN_PAGES = amrestore.8 \
73 ALL_MAN_PAGES = $(AMPLOT_MAN_PAGES) \
77 $(RECOVER_MAN_PAGES) \
80 WANTED_MAN_PAGES = $(COMMON_MAN_PAGES)
82 WANTED_MAN_PAGES += $(AMPLOT_MAN_PAGES)
85 WANTED_MAN_PAGES += $(CLIENT_MAN_PAGES)
88 WANTED_MAN_PAGES += $(SERVER_MAN_PAGES)
91 WANTED_MAN_PAGES += $(RECOVER_MAN_PAGES)
94 WANTED_MAN_PAGES += $(RESTORE_MAN_PAGES)
97 SRCMANPAGEDIR = $(srcdir)/xml-source
99 MAN_XML = $(ALL_MAN_PAGES:%=xml-source/%.xml)
101 EXTRA_XML = xslt/expand-sambadoc.xsl \
105 entities/global.entities.in \
106 entities/xinclude.dtd
108 EXTRA_DIST = $(ALL_MAN_PAGES) $(MAN_XML) $(EXTRA_HTML) $(EXTRA_XML)
110 GEN_XML = $(ALL_MAN_PAGES:%=xml-source/%.proc.xml)
112 MOSTLYCLEANFILES = $(GEN_XML)
113 MAINTAINERCLEANFILES = $(ALL_MAN_PAGES)
115 # some of the XSL needs to know what docbook-xsl version we've selected
116 %.xsl: %.xsl.in $(top_builddir)/config.status
117 $(top_builddir)/config.status --file=$@:$<
120 entities/global.entities: entities/global.entities.in $(top_builddir)/config.status
121 $(top_builddir)/config.status --file=$@:$<
124 if ENABLE_MANPAGE_BUILD
125 # phase one of the documentation build expands some macros.
126 xml-source/%.proc.xml: $(SRCMANPAGEDIR)/%.xml $(srcdir)/xslt/expand-sambadoc.xsl entities/global.entities
127 $(XSLTPROC) $(XSLTPROC_FLAGS) --path "$(srcdir)/xslt/:$(builddir)/entities/" --xinclude --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --output $@ $(srcdir)/xslt/expand-sambadoc.xsl $<
129 # phase two generates a manpage from the resulting "expanded" docbook XML
130 %: xml-source/%.proc.xml $(srcdir)/xslt/man.xsl entities/global.entities
131 $(XSLTPROC) $(XSLTPROC_FLAGS) --path "$(srcdir)/xslt/:$(builddir)/entities/" --output $@ xslt/man.xsl $<
133 %.html: xml-source/%.proc.xml $(srcdir)/xslt/html.xsl entities/global.entities
134 $(XSLTPROC) $(XSLTPROC_FLAGS) --path "$(srcdir)/xslt/:$(builddir)/entities/" --output $@ xslt/html.xsl $<
136 else !ENABLE_MANPAGE_BUILD
138 %: $(SRCMANPAGEDIR)/%.xml
139 @echo WARNING: Not building needed $@ because building manpages is disabled.
142 # (no rule to build HTML without ENABLE_MANPAGE_BUILD)
154 ALL_MAN_HTMLS = $(ALL_MAN_PAGES:%=%.html)
156 # toplevel rule to build HTML manpages and tar them up
157 html: amanda.css index.php $(ALL_MAN_HTMLS)
158 tar -zcf html.tar.gz $(ALL_MAN_HTMLS) amanda.css index.php
160 # double-check that we don't ship dummy manpages
162 for f in $(WANTED_MAN_PAGES); do \
163 if sed -e 1q $(distdir)/$$f | $(GREP) '^DUMMY$$' >/dev/null 2>/dev/null; then \
164 echo "$(distdir)/$$f is a dummy manpage; cannot create distribution"; \
169 man_MANS = $(WANTED_MAN_PAGES)