annotate DOCS/xml/Makefile @ 31106:2290cf3ae4f8

XML docs: Make xmllint-* targets a dependency of html-chunked-*/html-single-*. Since the xmllint-* targets are phony, they should never be a dependency of real targets, so make them a dependency of the phony html-chunked-* / html-single-* targets instead. This is just as correct, but now the docs are regenerated when dependencies change and not with every make invocation.
author diego
date Tue, 11 May 2010 14:27:26 +0000
parents cf40376e7302
children a29b422baba5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
1 # Makefile for generating the HTML documentation
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
2
27296
a316bc1ea84d Only build the documentation in the languages requested from configure.
diego
parents: 23492
diff changeset
3 include ../../config.mak
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
4
29965
1bff8cc9ca6b Do not build monolithic documentation in a separate directory.
diego
parents: 29964
diff changeset
5 # Generated HTML files go here.
1bff8cc9ca6b Do not build monolithic documentation in a separate directory.
diego
parents: 29964
diff changeset
6 HTML = ../HTML
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
7
29971
582d78986e87 Factorize generating the list of all main.xml files.
diego
parents: 29970
diff changeset
8 MAIN_XML_ALL = $(foreach lang,$(DOC_LANG_ALL),$(lang)/main.xml)
29981
76d95b4aa142 Factorize all components generated by configure into a variable.
diego
parents: 29972
diff changeset
9 CONFIGURE_GENERATED = html-chunk.xsl html-single.xsl xsltproc.sh xmllint.sh
29971
582d78986e87 Factorize generating the list of all main.xml files.
diego
parents: 29970
diff changeset
10
11818
c219c245aa50 Build target names shortened.
diego
parents: 11817
diff changeset
11 all: html-chunked html-single
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
12
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents: 10110
diff changeset
13 help:
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents: 10110
diff changeset
14 @echo "Targets:"
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents: 10110
diff changeset
15 @echo "********"
27296
a316bc1ea84d Only build the documentation in the languages requested from configure.
diego
parents: 23492
diff changeset
16 @echo "all : Build everything for configured languages (default)."
a316bc1ea84d Only build the documentation in the languages requested from configure.
diego
parents: 23492
diff changeset
17 @echo "html-single : HTML documentation for configured languages (single file)"
11883
51e14a023339 Structure rewritten, to allow single language build and some simplifications.
wight
parents: 11841
diff changeset
18 @echo "html-single-LANG : As above, but only one language."
27296
a316bc1ea84d Only build the documentation in the languages requested from configure.
diego
parents: 23492
diff changeset
19 @echo "html-chunked : HTML documentation for configured languages (multiple files)"
11883
51e14a023339 Structure rewritten, to allow single language build and some simplifications.
wight
parents: 11841
diff changeset
20 @echo "html-chunked-LANG : As above, but only one language."
29989
9496061d46a1 The general xmllint target should only check configured languages.
diego
parents: 29988
diff changeset
21 @echo "xmllint : Check syntax of XML files for configured languages."
29986
31e6eb42db99 spelling cosmetics
diego
parents: 29985
diff changeset
22 @echo "xmllint-LANG : Check syntax of LANG XML files."
29965
1bff8cc9ca6b Do not build monolithic documentation in a separate directory.
diego
parents: 29964
diff changeset
23 @echo "clean : Purge the 'HTML' directory."
15101
04a5b6407cb6 Add releaseclean target to remove generated files but keep the HTML.
diego
parents: 14393
diff changeset
24 @echo "releaseclean : Remove generated files but keep the HTML."
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11130
diff changeset
25 @echo "distclean : Remove ALL generated files."
27296
a316bc1ea84d Only build the documentation in the languages requested from configure.
diego
parents: 23492
diff changeset
26 @echo "Substitute LANG for one of $(DOC_LANG_ALL)"
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
27
29964
5513e1981e0e - Remove now unnecessary dependency on intermediate directories.
diego
parents: 29963
diff changeset
28 html-chunked: $(addprefix html-chunked-,$(DOC_LANGS))
5513e1981e0e - Remove now unnecessary dependency on intermediate directories.
diego
parents: 29963
diff changeset
29 html-single: $(addprefix html-single-,$(DOC_LANGS))
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11130
diff changeset
30
29989
9496061d46a1 The general xmllint target should only check configured languages.
diego
parents: 29988
diff changeset
31 xmllint: $(addprefix xmllint-,$(DOC_LANGS))
15126
6555c01128b7 Support syntax checking only
wight
parents: 15101
diff changeset
32
29965
1bff8cc9ca6b Do not build monolithic documentation in a separate directory.
diego
parents: 29964
diff changeset
33 $(foreach lang,$(DOC_LANG_ALL),$(HTML)/$(lang)):
29990
af94a2bdc185 Do not ignore errors from mkdir invocations.
diego
parents: 29989
diff changeset
34 mkdir -p $@
28216
119286d52a9a Get rid of pointless chunked-dir and single-dir targets.
diego
parents: 28215
diff changeset
35
29982
d44a9fa37399 Exploit one more opportunity to make use of the CONFIGURE_GENERATED variable.
diego
parents: 29981
diff changeset
36 $(CONFIGURE_GENERATED) $(MAIN_XML_ALL):
11841
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11818
diff changeset
37 sh configure
11063
f44ee899fbf1 clean -> clean-html
gabucino
parents: 11052
diff changeset
38
11883
51e14a023339 Structure rewritten, to allow single language build and some simplifications.
wight
parents: 11841
diff changeset
39 define lang-def
31106
2290cf3ae4f8 XML docs: Make xmllint-* targets a dependency of html-chunked-*/html-single-*.
diego
parents: 31105
diff changeset
40 html-chunked-$(lang): xmllint-$(lang) $(HTML)/$(lang)/index.html
2290cf3ae4f8 XML docs: Make xmllint-* targets a dependency of html-chunked-*/html-single-*.
diego
parents: 31105
diff changeset
41 html-single-$(lang): xmllint-$(lang) $(HTML)/$(lang)/MPlayer.html
2290cf3ae4f8 XML docs: Make xmllint-* targets a dependency of html-chunked-*/html-single-*.
diego
parents: 31105
diff changeset
42 $(HTML)/$(lang)/index.html $(HTML)/$(lang)/MPlayer.html: $(lang)/main.xml $(wildcard $(lang)/*.xml) $(HTML)/$(lang) html-common.xsl $(HTML)/$(lang)/default.css
29987
a8ac62150c75 Factorize dependencies of language-specific HTML generation targets.
diego
parents: 29986
diff changeset
43
31103
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
44 $(HTML)/$(lang)/default.css: $(HTML)/$(lang)
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
45 cp -f default.css $$(@D)
11883
51e14a023339 Structure rewritten, to allow single language build and some simplifications.
wight
parents: 11841
diff changeset
46
31103
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
47 $(HTML)/$(lang)/index.html:
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
48 ./xsltproc.sh $$(@D)/ html-chunk.xsl $$<
11883
51e14a023339 Structure rewritten, to allow single language build and some simplifications.
wight
parents: 11841
diff changeset
49
31103
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
50 $(HTML)/$(lang)/MPlayer.html:
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
51 ./xsltproc.sh $$@ html-single.xsl $$<
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
52
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
53 xmllint-$(lang): $(lang)/main.xml
1ff8bca53fe6 Make XML documentation build process nonrecursive.
diego
parents: 31095
diff changeset
54 ./xmllint.sh $$<
11883
51e14a023339 Structure rewritten, to allow single language build and some simplifications.
wight
parents: 11841
diff changeset
55 endef
51e14a023339 Structure rewritten, to allow single language build and some simplifications.
wight
parents: 11841
diff changeset
56
30003
e709ce5b5d34 Simplify the evaluation of the lang-def template:
diego
parents: 29991
diff changeset
57 $(foreach lang, $(DOC_LANG_ALL),$(eval $(lang-def)))
22467
7336cfb3b88f Merge all .PHONY target declarations.
diego
parents: 21649
diff changeset
58
28220
e8a6bde9ef9e cosmetics: Move clean targets to the bottom.
diego
parents: 28219
diff changeset
59 clean:
29991
79720cbec672 Ignore errors from failing rm commands in clean targets.
diego
parents: 29990
diff changeset
60 -rm -rf $(HTML)
28220
e8a6bde9ef9e cosmetics: Move clean targets to the bottom.
diego
parents: 28219
diff changeset
61
28221
ded986da716f nonrecursive releaseclean target
diego
parents: 28220
diff changeset
62 releaseclean:
29991
79720cbec672 Ignore errors from failing rm commands in clean targets.
diego
parents: 29990
diff changeset
63 -rm -f $(CONFIGURE_GENERATED)
79720cbec672 Ignore errors from failing rm commands in clean targets.
diego
parents: 29990
diff changeset
64 -rm -f $(MAIN_XML_ALL)
28220
e8a6bde9ef9e cosmetics: Move clean targets to the bottom.
diego
parents: 28219
diff changeset
65
e8a6bde9ef9e cosmetics: Move clean targets to the bottom.
diego
parents: 28219
diff changeset
66 distclean: clean releaseclean
e8a6bde9ef9e cosmetics: Move clean targets to the bottom.
diego
parents: 28219
diff changeset
67
29988
ee933259f32b Improve declaration of phony targets.
diego
parents: 29987
diff changeset
68 .PHONY: all help html-chunked html-single xmllint
31105
cf40376e7302 Only mark targets whose names end in "clean" as phony.
diego
parents: 31103
diff changeset
69 .PHONY: html-chunked-* html-single-* xmllint-* *clean