Makefile.am 2.33 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)
6
dist_html_DATA = $(HTMLDOCS) kea-guide.css kea-logo-100x70.png
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 shell.xml agent.xml
12 13

EXTRA_DIST = $(DOCBOOK)
14

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

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

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

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

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

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

46 47 48
else

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

52 53 54 55 56 57 58 59
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 \
60
	-P term.breakline=1 -P filename.as.url=0 \
Josh Soref's avatar
Josh Soref committed
61
	-P imagedata.default.scale="maxwidth=50px,maxheight=35px"
62 63 64 65 66 67 68 69 70 71 72 73 74 75

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.

76
endif