Mercurial > mplayer.hg
annotate DOCS/xml/Makefile.inc @ 29973:113ab3d1feab
Factorize stylesheet installation into its own target.
author | diego |
---|---|
date | Mon, 14 Dec 2009 00:42:46 +0000 |
parents | 03e8eec6e104 |
children | f5dc9e815865 |
rev | line source |
---|---|
9674 | 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 | 3 # |
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. |
29966 | 7 COMMON_XSL_DEPS := ../html-common.xsl $(wildcard html-common.xsl) |
11887 | 8 |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11045
diff
changeset
|
9 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
|
10 HTML_CHUNK_XSL := html-chunk.xsl |
11887 | 11 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
|
12 else |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11045
diff
changeset
|
13 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
|
14 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
|
15 endif |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11045
diff
changeset
|
16 |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
17 ifeq (html-single.xsl,$(wildcard html-single.xsl)) |
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
18 HTML_SINGLE_XSL := html-single.xsl |
11887 | 19 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
|
20 else |
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
21 HTML_SINGLE_XSL := ../html-single.xsl |
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
22 XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl |
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
23 endif |
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
24 |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
10025
diff
changeset
|
25 # Fall back to the default HTML stylesheet if none is specified. |
9674 | 26 HTML_STYLESHEET ?= ../default.css |
27 | |
28 # This is the main target... | |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
29 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
|
30 html-chunked: $(HTMLDIR)/index.html |
29972
03e8eec6e104
Construct monolithic targets with the HTMLDIR instead of the HTMLFILE variable.
diego
parents:
29967
diff
changeset
|
31 html-single: $(HTMLDIR)/MPlayer.html |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11045
diff
changeset
|
32 |
12969
e589db41eb34
Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents:
11893
diff
changeset
|
33 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
|
34 |
15126 | 35 xmllint: main.xml $(SYMLINKS_DEPS) |
36 ../xmllint.sh $< | |
37 | |
29973
113ab3d1feab
Factorize stylesheet installation into its own target.
diego
parents:
29972
diff
changeset
|
38 $(HTMLDIR)/default.css: |
113ab3d1feab
Factorize stylesheet installation into its own target.
diego
parents:
29972
diff
changeset
|
39 cp -f ../default.css $(@D) |
113ab3d1feab
Factorize stylesheet installation into its own target.
diego
parents:
29972
diff
changeset
|
40 |
113ab3d1feab
Factorize stylesheet installation into its own target.
diego
parents:
29972
diff
changeset
|
41 $(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css |
11841 | 42 ../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
|
43 |
29973
113ab3d1feab
Factorize stylesheet installation into its own target.
diego
parents:
29972
diff
changeset
|
44 $(HTMLDIR)/MPlayer.html: main.xml $(XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css |
29953
ff601a46cbaf
Use automatic variables instead of the target name.
diego
parents:
29952
diff
changeset
|
45 ../xsltproc.sh $@ $(HTML_SINGLE_XSL) $< |
9674 | 46 |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11525
diff
changeset
|
47 ../html-chunk.xsl ../html-single.xsl main.xml: |
11326 | 48 cd .. && sh configure |
11045 | 49 |
12969
e589db41eb34
Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents:
11893
diff
changeset
|
50 $(filter-out main.xml, $(patsubst ../en/%,%, $(wildcard ../en/*.xml))): |
e589db41eb34
Make symlinks behavior more sensible - regenerate symlinks (and documentation)
wight
parents:
11893
diff
changeset
|
51 $(if $(findstring yes,$(USE_SYMLINKS)), ,exit 0;)\ |
11893 | 52 for file in ../en/*.xml ; do \ |
53 if ! test -r `basename $$file` ; then \ | |
54 ln -s $$file `basename $$file` ; \ | |
55 fi; \ | |
56 done | |
57 | |
28221 | 58 .PHONY: all html-chunked html-single xmllint |