c494977f8b4771d2d672c39cdbb7b76e546ba7da
[openafs.git] / doc / xml / QuickStartUnix / Makefile.in
1 # Makefile to build the AFS QuickStart guide for Unix.
2 #
3 # This makefile assumes that various utilities are available on the system.
4 # On Debian lenny, installing the packages:
5 #
6 #     dblatex
7 #     docbook-xsl
8 #     libxml2-utils
9 #     xsltproc
10 #
11 # gave me all the utilities needed.
12 #
13 # HTML_XSL is specific to Debian and will need to be modified on other
14 # systems until we have a better mechanism for finding the correct path.
15
16 BOOK = auqbg000
17
18 all: $(BOOK).pdf index.html $(BOOK).epub $(BOOK).mobi
19
20 include @TOP_OBJDIR@/src/config/Makefile.config
21 VERSION=version
22 include @TOP_OBJDIR@/src/config/Makefile.version
23
24 SRCS     = $(BOOK).xml auqbg003.xml auqbg004.xml auqbg005.xml auqbg006.xml \
25            auqbg007.xml auqbg008.xml appendix.xml appendix_dafs.xml \
26            $(VERSION).xml
27 HTML_XSL = @HTML_XSL@
28 DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
29 XSLTPROC = @XSLTPROC@
30 DOCBOOK2PDF = @DOCBOOK2PDF@
31 DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub
32 KINDLEGEN = @KINDLEGEN@
33
34 index.html: $(SRCS)
35         $(XSLTPROC) --param navig.graphics 1 \
36             --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml
37
38 $(BOOK).pdf: $(SRCS)
39         if test "x$(DOCBOOK2PDF)" = "xfop"; then \
40                 $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \
41                 $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \
42         else \
43                 $(DOCBOOK2PDF) $(BOOK).xml; \
44         fi
45
46 $(BOOK).epub: $(SRCS)
47         if test -x "$(DBTOEPUB)" ; then \
48                 $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \
49         fi
50
51 $(BOOK).mobi: $(BOOK).epub
52         if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \
53                 $(KINDLEGEN) $(BOOK).epub -o $(BOOK).mobi; \
54         fi
55
56 check:
57         xmllint --noout --valid $(BOOK).xml
58
59 clean:
60         rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf