annotate DOCS/xml/Makefile.inc @ 27851:dc0d56d55a71

44% synced with r22753 (going on... ;))
author ptt
date Mon, 03 Nov 2008 10:35:54 +0000
parents 2ec14bc3a3b3
children ded986da716f
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 #
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents: 10025
diff changeset
2 # Makefile.inc for Makefiles in subdirectories.
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
3 #
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
4
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
5 # Use customized html-chunk.xsl and/or html-single.xsl file if they exist...
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
6 # Also add html-common.xsl to depends if it exists.
11887
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
7 ifeq (html-common.xsl,$(wildcard html-common.xsl))
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
8 COMMON_XSL_DEPS := html-common.xsl ../html-common.xsl
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
9 else
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
10 COMMON_XSL_DEPS := ../html-common.xsl
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
11 endif
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
12
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
13 ifeq (html-chunk.xsl,$(wildcard html-chunk.xsl))
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
14 HTML_CHUNK_XSL := html-chunk.xsl
11887
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
15 CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-chunk.xsl $(COMMON_XSL_DEPS)
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
16 else
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
17 HTML_CHUNK_XSL := ../html-chunk.xsl
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
18 CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-common.xsl
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
19 endif
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
20
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
21 ifeq (html-single.xsl,$(wildcard html-single.xsl))
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
22 HTML_SINGLE_XSL := html-single.xsl
11887
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
23 XSL_DEPS := $(HTML_SINGLE_XSL) ../html-single.xsl $(COMMON_XSL_DEPS)
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
24 else
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
25 HTML_SINGLE_XSL := ../html-single.xsl
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
26 XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
27 endif
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
28
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents: 10025
diff changeset
29 # Fall back to the default HTML stylesheet if none is specified.
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
30 HTML_STYLESHEET ?= ../default.css
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
31
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
32 # This is the main target...
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
33 all: html-chunked html-single
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
34 html-chunked: $(HTMLDIR)/index.html
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
35 html-single: $(HTMLFILE)
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
36
12969
e589db41eb34 Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents: 11893
diff changeset
37 SYMLINKS_DEPS:=$(if $(findstring yes,$(USE_SYMLINKS)), $(patsubst ../en/%,%,$(wildcard ../en/*.xml)))
e589db41eb34 Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents: 11893
diff changeset
38
15126
6555c01128b7 Support syntax checking only
wight
parents: 12969
diff changeset
39 xmllint: main.xml $(SYMLINKS_DEPS)
6555c01128b7 Support syntax checking only
wight
parents: 12969
diff changeset
40 ../xmllint.sh $<
6555c01128b7 Support syntax checking only
wight
parents: 12969
diff changeset
41
12969
e589db41eb34 Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents: 11893
diff changeset
42 $(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS)
11887
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
43 ifndef HTMLDIR
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
44 $(warning $(HTMLDIR))
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
45 $(warning Error: HTMLDIR not set!!!)
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
46 $(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
47 $(error Don't do this!)
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
48 endif
11841
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
49 -rm -f $(HTMLDIR)/*
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
50 ../xmllint.sh $<
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
51 cp -f $(HTML_STYLESHEET) $(HTMLDIR)/
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
52 ../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11045
diff changeset
53
12969
e589db41eb34 Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents: 11893
diff changeset
54 $(HTMLFILE): main.xml $(XSL_DEPS) $(SYMLINKS_DEPS)
11887
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
55 ifndef HTMLFILE
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
56 $(warning Error: HTMLFILE not set!!!)
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
57 $(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
58 $(error Don't do this!)
b09020364bfb Simplifications and bug fixes by Torinthiel.
diego
parents: 11841
diff changeset
59 endif
11841
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
60 -rm -f $(HTMLFILE)
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
61 ../xmllint.sh $<
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
62 cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)`
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
63 ../xsltproc.sh $(HTMLFILE) $(HTML_SINGLE_XSL) $<
9674
461f71ba8af4 XML version of MPlayer's doc
nicolas
parents:
diff changeset
64
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11525
diff changeset
65 ../html-chunk.xsl ../html-single.xsl main.xml:
11326
23192e33fad5 Dependencies for autogenerated files added.
diego
parents: 11310
diff changeset
66 cd .. && sh configure
11045
4dc3149f5b74 Support for building incomplete translations.
diego
parents: 10914
diff changeset
67
12969
e589db41eb34 Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents: 11893
diff changeset
68 $(filter-out main.xml, $(patsubst ../en/%,%, $(wildcard ../en/*.xml))):
e589db41eb34 Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents: 11893
diff changeset
69 $(if $(findstring yes,$(USE_SYMLINKS)), ,exit 0;)\
11893
cf34e63146bf Move symlinks to a separate target
wight
parents: 11887
diff changeset
70 for file in ../en/*.xml ; do \
cf34e63146bf Move symlinks to a separate target
wight
parents: 11887
diff changeset
71 if ! test -r `basename $$file` ; then \
cf34e63146bf Move symlinks to a separate target
wight
parents: 11887
diff changeset
72 ln -s $$file `basename $$file` ; \
cf34e63146bf Move symlinks to a separate target
wight
parents: 11887
diff changeset
73 fi; \
cf34e63146bf Move symlinks to a separate target
wight
parents: 11887
diff changeset
74 done
cf34e63146bf Move symlinks to a separate target
wight
parents: 11887
diff changeset
75
11045
4dc3149f5b74 Support for building incomplete translations.
diego
parents: 10914
diff changeset
76 distclean:
11841
67550c3b21a5 Make the build system print everything it does.
diego
parents: 11817
diff changeset
77 rm -f main.xml
18125
08f997fbe16d Simplify link removal.
diego
parents: 15126
diff changeset
78 rm -f `find *.xml -type l`;
26460
2ec14bc3a3b3 Move phony target declaration to the bottom of the file; add distclean target.
diego
parents: 18125
diff changeset
79
2ec14bc3a3b3 Move phony target declaration to the bottom of the file; add distclean target.
diego
parents: 18125
diff changeset
80 .PHONY: all html-chunked html-single xmllint distclean