1.1.1
by Torsten Spindler
More useful comments in Makefile |
1 |
# This is an example Makefile for converting the docbook XML to
|
2 |
# PDF and HTML.
|
|
3 |
||
4 |
||
5 |
# This is quite a hack, a patch that integrates the call of the
|
|
6 |
# top level Makefile is welcome.
|
|
1
by Billy Cina
Initial release |
7 |
|
8 |
ifeq ($(CURDIR)x,x)
|
|
9 |
CURDIR = $(shell pwd) |
|
10 |
endif
|
|
11 |
||
76
by Torsten Spindler
Use make book to create coursebook |
12 |
BOOKTARGET = desktop-course-book.pdf |
13 |
BOOKSOURCE = desktop-course-book.xml |
|
1
by Billy Cina
Initial release |
14 |
DIRTARGETS = $(addsuffix stamp,$(wildcard */)) |
15 |
HTMLTARGETS = $(addsuffix .html,$(basename $(wildcard *.xml))) |
|
16 |
PDFTARGETS = $(addsuffix .pdf,$(basename $(wildcard *.xml))) |
|
17 |
||
18 |
||
19 |
all: $(DIRTARGETS) $(HTMLTARGETS) $(PDFTARGETS) |
|
20 |
||
21 |
XSLTPROC = /usr/bin/xsltproc |
|
22 |
DBLATEX = /usr/bin/dblatex |
|
82
by Torsten Spindler
Add option so make all creates book |
23 |
DBLATEXOPTS = -P doc.lot.show='' -Ichapter1 -Ichapter2 -Ichapter3 -Ichapter4 -Ichapter5 -Ichapter6 -Ichapter7 -Ichapter8 -Ichapter9 -Ichapter10 -Ichapter11 |
1
by Billy Cina
Initial release |
24 |
XSL ?= $(CURDIR)/lib/ubuntu.xsl |
25 |
||
26 |
%/stamp: %/ |
|
27 |
@$(MAKE) CURDIR=$(CURDIR) XSL=$(XSL) -f $(CURDIR)/Makefile -C $< |
|
28 |
||
29 |
# If you need to specify a custom XSL here, dblatex accepts the -p switch
|
|
30 |
%.pdf: %.xml |
|
81
by Torsten Spindler
Remove List of tables and figures |
31 |
@$(DBLATEX) $(DBLATEXOPTS) -tpdf -o $@ $< |
1
by Billy Cina
Initial release |
32 |
|
33 |
%.html: %.xml $(XSL) |
|
34 |
@$(XSLTPROC) -o $@ $(XSL) $< |
|
35 |
||
76
by Torsten Spindler
Use make book to create coursebook |
36 |
book: |
82
by Torsten Spindler
Add option so make all creates book |
37 |
@$(DBLATEX) $(DBLATEXOPTS) -tpdf -o $(BOOKTARGET) $(BOOKSOURCE) |
76
by Torsten Spindler
Use make book to create coursebook |
38 |
|
1
by Billy Cina
Initial release |
39 |
clean: |
40 |
@rm -f *.html *.pdf */*.html */*.pdf |
|
41 |
||
42 |
#.PHONY: $(DIRTARGETS)
|