Makefile.am 2.21 KB
Newer Older
Jeremy C. Reed's avatar
Jeremy C. Reed committed
1
# generated documentation
Tomek Mrugalski's avatar
Tomek Mrugalski committed
2
HTMLDOCS = kea-guide.html kea-messages.html
3
DOCS = kea-guide.txt
Jeremy C. Reed's avatar
Jeremy C. Reed committed
4

5
dist_doc_DATA = $(DOCS)
Tomek Mrugalski's avatar
Tomek Mrugalski committed
6
dist_html_DATA = $(HTMLDOCS) kea-guide.css
Jeremy C. Reed's avatar
Jeremy C. Reed committed
7

8
DOCBOOK = kea-guide.xml intro.xml quickstart.xml install.xml admin.xml config.xml
9
10
DOCBOOK += keactrl.xml dhcp4-srv.xml dhcp6-srv.xml lease-expiration.xml logging.xml
DOCBOOK += ddns.xml hooks.xml libdhcp.xml lfc.xml stats.xml ctrl-channel.xml faq.xml
11
DOCBOOK += classify.xml
12
13

EXTRA_DIST = $(DOCBOOK)
Tomek Mrugalski's avatar
Tomek Mrugalski committed
14
DISTCLEANFILES = $(HTMLDOCS) $(DOCS) kea-messages.xml
Jeremy C. Reed's avatar
Jeremy C. Reed committed
15

16
kea-messages.xml:
17
	$(top_srcdir)/tools/system_messages -o $@ \
18
	`find $(top_srcdir) -name "*.mes" -print`
19

20
# This is not a "man" manual, but reuse this for now for docbook.
21
if GENERATE_DOCS
22

23
kea-guide.html: $(DOCBOOK)
24
	@XSLTPROC@ --novalid --xinclude --nonet \
25
26
		--path $(top_builddir)/doc \
		-o $@ \
27
28
		--stringparam section.autolabel 1 \
		--stringparam section.label.includes.component.label 1 \
Tomek Mrugalski's avatar
Tomek Mrugalski committed
29
		--stringparam html.stylesheet kea-guide.css \
30
		http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \
Tomek Mrugalski's avatar
Tomek Mrugalski committed
31
		$(srcdir)/kea-guide.xml
32

Tomek Mrugalski's avatar
Tomek Mrugalski committed
33
34
kea-guide.txt: kea-guide.html
	@ELINKS@ -dump -no-numbering -no-references kea-guide.html > $@
35

Tomek Mrugalski's avatar
Tomek Mrugalski committed
36
kea-messages.html: kea-messages.xml
37
	@XSLTPROC@ --novalid --xinclude --nonet \
38
39
		--path $(top_builddir)/doc \
		-o $@ \
40
		--stringparam generate.toc "book toc" \
Tomek Mrugalski's avatar
Tomek Mrugalski committed
41
		--stringparam html.stylesheet kea-guide.css \
42
		http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \
Tomek Mrugalski's avatar
Tomek Mrugalski committed
43
		kea-messages.xml
44

45
46
47
else

$(HTMLDOCS) $(DOCS):
48
	@echo Doc generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
49
	@echo Doc generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild Kea > $@
50

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
endif 

if HAVE_DBLATEX

CLEANFILES = kea-guide.pdf kea-messages.pdf

DBLATEX_FLAGS = --xslt-opts=--path --xslt-opts=$(abs_top_builddir)/doc \
	-P doc.collab.show=0 -P latex.output.revhistory=0 \
	--param=term.breakline=1

pdf: kea-guide.pdf kea-messages.pdf

kea-guide.pdf: $(DOCBOOK)
	@DBLATEX@ $(DBLATEX_FLAGS) kea-guide.xml

kea-messages.pdf: kea-messages.xml
	@DBLATEX@ $(DBLATEX_FLAGS) kea-messages.xml

else

pdf kea-guide.pdf kea-messages.pdf:
	@echo Install dblatex tool and rerun ./configure to be able to generate documentation in PDF format.

74
endif