diff options
author | Richard Purdie <richard@openedhand.com> | 2005-08-31 10:47:56 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2005-08-31 10:47:56 +0000 |
commit | f54da734eb7b69e8e34de505bd89a13479e230e0 (patch) | |
tree | f796bea6f5683dfe3d591ca5390d12fd78e59c96 /bitbake/doc/manual/Makefile | |
parent | 4b46c1f6e891b1ddd5968536440b888661fade3e (diff) | |
download | poky-f54da734eb7b69e8e34de505bd89a13479e230e0.tar.gz |
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@2 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/doc/manual/Makefile')
-rw-r--r-- | bitbake/doc/manual/Makefile | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/bitbake/doc/manual/Makefile b/bitbake/doc/manual/Makefile new file mode 100644 index 0000000000..a43c025455 --- /dev/null +++ b/bitbake/doc/manual/Makefile | |||
@@ -0,0 +1,56 @@ | |||
1 | topdir = . | ||
2 | manual = $(topdir)/usermanual.xml | ||
3 | # types = pdf txt rtf ps xhtml html man tex texi dvi | ||
4 | # types = pdf txt | ||
5 | types = $(xmltotypes) $(htmltypes) | ||
6 | xmltotypes = pdf txt | ||
7 | htmltypes = html xhtml | ||
8 | htmlxsl = $(if $(filter $@,$(foreach type,$(htmltypes),$(type)-nochunks)),http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl,http://docbook.sourceforge.net/release/xsl/current/$@/chunk.xsl) | ||
9 | htmlcssfile = docbook.css | ||
10 | htmlcss = $(topdir)/html.css | ||
11 | # htmlcssfile = | ||
12 | # htmlcss = | ||
13 | cleanfiles = $(foreach i,$(types),$(topdir)/$(i)) | ||
14 | |||
15 | ifdef DEBUG | ||
16 | define command | ||
17 | $(1) | ||
18 | endef | ||
19 | else | ||
20 | define command | ||
21 | @echo $(2) $(3) $(4) | ||
22 | @$(1) >/dev/null | ||
23 | endef | ||
24 | endif | ||
25 | |||
26 | all: $(types) | ||
27 | |||
28 | lint: $(manual) FORCE | ||
29 | $(call command,xmllint --xinclude --postvalid --noout $(manual),XMLLINT $(manual)) | ||
30 | |||
31 | $(types) $(foreach type,$(htmltypes),$(type)-nochunks): lint FORCE | ||
32 | |||
33 | $(foreach type,$(htmltypes),$(type)-nochunks): $(if $(htmlcss),$(htmlcss)) $(manual) | ||
34 | @mkdir -p $@ | ||
35 | ifdef htmlcss | ||
36 | $(call command,install -m 0644 $(htmlcss) $@/$(htmlcssfile),CP $(htmlcss) $@/$(htmlcssfile)) | ||
37 | endif | ||
38 | $(call command,xsltproc --stringparam base.dir $@/ $(if $(htmlcssfile),--stringparam html.stylesheet $(htmlcssfile)) $(htmlxsl) $(manual) > $@/index.$(patsubst %-nochunks,%,$@),XSLTPROC $@ $(manual)) | ||
39 | |||
40 | $(htmltypes): $(if $(htmlcss),$(htmlcss)) $(manual) | ||
41 | @mkdir -p $@ | ||
42 | ifdef htmlcss | ||
43 | $(call command,install -m 0644 $(htmlcss) $@/$(htmlcssfile),CP $(htmlcss) $@/$(htmlcssfile)) | ||
44 | endif | ||
45 | $(call command,xsltproc --stringparam base.dir $@/ $(if $(htmlcssfile),--stringparam html.stylesheet $(htmlcssfile)) $(htmlxsl) $(manual),XSLTPROC $@ $(manual)) | ||
46 | |||
47 | $(xmltotypes): $(manual) | ||
48 | $(call command,xmlto --extensions -o $(topdir)/$@ $@ $(manual),XMLTO $@ $(manual)) | ||
49 | |||
50 | clean: | ||
51 | rm -rf $(cleanfiles) | ||
52 | |||
53 | $(foreach i,$(types) $(foreach type,$(htmltypes),$(type)-nochunks),clean-$(i)): | ||
54 | rm -rf $(patsubst clean-%,%,$@) | ||
55 | |||
56 | FORCE: | ||