|
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 |
||
12 |
DIRTARGETS = $(addsuffix stamp,$(wildcard */)) |
|
13 |
HTMLTARGETS = $(addsuffix .html,$(basename $(wildcard *.xml))) |
|
14 |
PDFTARGETS = $(addsuffix .pdf,$(basename $(wildcard *.xml))) |
|
15 |
||
16 |
||
17 |
all: $(DIRTARGETS) $(HTMLTARGETS) $(PDFTARGETS) |
|
18 |
||
19 |
XSLTPROC = /usr/bin/xsltproc |
|
20 |
DBLATEX = /usr/bin/dblatex |
|
21 |
XSL ?= $(CURDIR)/lib/ubuntu.xsl |
|
22 |
||
23 |
%/stamp: %/ |
|
24 |
@$(MAKE) CURDIR=$(CURDIR) XSL=$(XSL) -f $(CURDIR)/Makefile -C $< |
|
25 |
||
26 |
# If you need to specify a custom XSL here, dblatex accepts the -p switch
|
|
27 |
%.pdf: %.xml |
|
28 |
@$(DBLATEX) -tpdf -o $@ $< |
|
29 |
||
30 |
%.html: %.xml $(XSL) |
|
31 |
@$(XSLTPROC) -o $@ $(XSL) $< |
|
32 |
||
33 |
clean: |
|
34 |
@rm -f *.html *.pdf */*.html */*.pdf |
|
35 |
||
36 |
#.PHONY: $(DIRTARGETS)
|