simtrace/docs/Makefile @ master
1 | 07299695 | Holger Hans Peter Freyther | # XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/
|
---|---|---|---|
2 | # Makefile from BitBake/OpenEmbedded manuals
|
||
3 | |||
4 | topdir = . |
||
5 | manual = $(topdir)/usermanual.xml |
||
6 | # types = pdf txt rtf ps xhtml html man tex texi dvi
|
||
7 | # types = pdf txt
|
||
8 | types = $(docbooktotypes) |
||
9 | docbooktotypes = pdf txt |
||
10 | # htmlcssfile =
|
||
11 | # htmlcss =
|
||
12 | cleanfiles = $(foreach i,$(types),$(topdir)/$(i)) |
||
13 | |||
14 | ifdef DEBUG |
||
15 | define command |
||
16 | $(1)
|
||
17 | endef
|
||
18 | else
|
||
19 | define command |
||
20 | @echo $(2) $(3) $(4) |
||
21 | @$(1)
|
||
22 | endef
|
||
23 | endif
|
||
24 | |||
25 | all: $(types) |
||
26 | |||
27 | lint: $(manual) FORCE |
||
28 | $(call command,xmllint --xinclude --postvalid --noout $(manual),XMLLINT $(manual)) |
||
29 | |||
30 | $(types): lint FORCE |
||
31 | |||
32 | |||
33 | $(docbooktotypes): $(manual) |
||
34 | $(call command,docbook2$@ $(manual),DOCBOOK2 $@ $(manual)) |
||
35 | |||
36 | clean: |
||
37 | rm -rf $(cleanfiles) |
||
38 | |||
39 | $(foreach i,$(types) $(foreach type,$(htmltypes),$(type)-nochunks),clean-$(i)): |
||
40 | rm -rf $(patsubst clean-%,%,$@) |
||
41 | |||
42 | FORCE: |