Commit | Line | Data |
---|---|---|
805e021f CE |
1 | # Makefile to build the AFS Admin 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 possibly specific to Debian and may need to be modified on other | |
14 | # systems. | |
15 | ||
16 | BOOK = auagd000 | |
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 auagd005.xml auagd006.xml auagd007.xml auagd008.xml \ | |
25 | auagd009.xml auagd010.xml auagd011.xml auagd012.xml auagd013.xml \ | |
26 | auagd014.xml auagd015.xml auagd017.xml auagd018.xml \ | |
27 | auagd019.xml auagd020.xml auagd021.xml auagd022.xml auagd023.xml \ | |
28 | auagd024.xml auagd025.xml $(VERSION).xml | |
29 | HTML_XSL = @HTML_XSL@ | |
30 | DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@ | |
31 | XSLTPROC = @XSLTPROC@ | |
32 | DOCBOOK2PDF = @DOCBOOK2PDF@ | |
33 | KINDLEGEN = @KINDLEGEN@ | |
34 | DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub | |
35 | ||
36 | index.html: $(SRCS) | |
37 | $(XSLTPROC) --param navig.graphics 1 \ | |
38 | --param use.id.as.filename 1 \ | |
39 | --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml | |
40 | ||
41 | $(BOOK).pdf: $(SRCS) | |
42 | if test "x$(DOCBOOK2PDF)" = "xfop"; then \ | |
43 | $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \ | |
44 | $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \ | |
45 | else \ | |
46 | $(DOCBOOK2PDF) $(BOOK).xml; \ | |
47 | fi | |
48 | ||
49 | $(BOOK).epub: $(SRCS) | |
50 | if test -x "$(DBTOEPUB)" ; then \ | |
51 | $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \ | |
52 | fi | |
53 | ||
54 | $(BOOK).mobi: $(BOOK).epub | |
55 | if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \ | |
56 | $(KINDLEGEN) $(BOOK).epub -o $(BOOK).mobi; \ | |
57 | fi | |
58 | ||
59 | check: | |
60 | xmllint --noout --valid $(BOOK).xml | |
61 | ||
62 | clean: | |
63 | rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf |