doc: generate admin ref from the pod documentation
[openafs.git] / doc / xml / AdminRef / Makefile.in
1 # Makefile to build the AFS Reference Guide for Unix.
2
3 BOOK = auarf000
4
5 all: $(BOOK).pdf $(BOOK).epub $(BOOK).mobi
6
7 include @TOP_OBJDIR@/src/config/Makefile.config
8 VERSION=version
9 include @TOP_OBJDIR@/src/config/Makefile.version
10
11 SRCS     = $(BOOK).xml preface.xml $(VERSION).xml \
12            entities.dtd sect1.xml sect5.xml sect8.xml
13 DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
14 XSLTPROC = @XSLTPROC@ --stringparam variablelist.as.blocks 1
15 DOCBOOK2PDF = @DOCBOOK2PDF@
16 DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub
17
18 entities.dtd sect1.xml sect5.xml sect8.xml:
19         ./generate-xml.pl $(TOP_SRCDIR)
20
21 $(BOOK).pdf: $(SRCS)
22         if test "x$(DOCBOOK2PDF)" = "xfop"; then \
23                 $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \
24                 $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \
25         else \
26                 $(DOCBOOK2PDF) $(BOOK).xml; \
27         fi
28
29 $(BOOK).epub: $(SRCS)
30         if test -x "$(DBTOEPUB)" ; then \
31                 $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \
32         fi
33
34 $(BOOK).mobi: $(BOOK).epub
35         kindlegen $(BOOK).epub -o $(BOOK).mobi
36
37 check:
38         xmllint --noout --valid $(BOOK).xml
39
40 clean:
41         rm -f $(BOOK).pdf $(BOOK).mobi $(BOOK).epub $(BOOK).fo \
42                 entities.dtd sect1.xml sect5.xml sect8.xml $(VERSION).xml
43         rm -rf sect1 sect5 sect8