Mercurial > mplayer.hg
comparison DOCS/xml/Makefile.inc @ 11188:6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
author | lumag |
---|---|
date | Mon, 20 Oct 2003 09:56:48 +0000 |
parents | 4dc3149f5b74 |
children | e7534574320c |
comparison
equal
deleted
inserted
replaced
11187:bd4a5a954644 | 11188:6dfed0b2a300 |
---|---|
1 # | 1 # |
2 # Makefile.inc for Makefiles in subdirectories. | 2 # Makefile.inc for Makefiles in subdirectories. |
3 # | 3 # |
4 | 4 |
5 # Use customized html.xsl file if it exists... | 5 # Use customized html.xsl and/or html-chunk.xsl file if they exist... |
6 # Also add html-common.xsl to depends if it exists. | |
6 ifeq (html.xsl,$(wildcard html.xsl)) | 7 ifeq (html.xsl,$(wildcard html.xsl)) |
7 HTML_XSL := html.xsl | 8 HTML_XSL := html.xsl |
8 XSL_DEPS := $(HTML_XSL) ../html.xsl ../html-common.xsl | 9 ifeq (html-common.xsl,$(wildcard html-common.xsl)) |
10 XSL_DEPS := $(HTML_XSL) html-common.xsl ../html.xsl ../html-common.xsl | |
11 else | |
12 XSL_DEPS := $(HTML_XSL) html-common.xsl ../html.xsl ../html-common.xsl | |
13 endif | |
9 else | 14 else |
10 HTML_XSL := ../html.xsl | 15 HTML_XSL := ../html.xsl |
11 XSL_DEPS := $(HTML_XSL) ../html-common.xsl | 16 XSL_DEPS := $(HTML_XSL) ../html-common.xsl |
17 endif | |
18 | |
19 ifeq (html-chunk.xsl,$(wildcard html-chunk.xsl)) | |
20 HTML_CHUNK_XSL := html-chunk.xsl | |
21 ifeq (html-common.xsl,$(wildcard html-common.xsl)) | |
22 CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) html-common.xsl ../html-chunk.xsl ../html-common.xsl | |
23 else | |
24 CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-chunk.xsl ../html-common.xsl | |
25 endif | |
26 else | |
27 HTML_CHUNK_XSL := ../html-chunk.xsl | |
28 CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-common.xsl | |
12 endif | 29 endif |
13 | 30 |
14 # Fall back to the default HTML stylesheet if none is specified. | 31 # Fall back to the default HTML stylesheet if none is specified. |
15 HTML_STYLESHEET ?= ../default.css | 32 HTML_STYLESHEET ?= ../default.css |
16 | 33 |
17 # This is the main target... | 34 # This is the main target... |
18 $(HTMLDIR)/index.html: documentation.xml $(XSL_DEPS) | 35 all: html html-chunked |
36 html: $(HTMLFILE) | |
37 html-chunked: $(HTMLDIR)/index.html | |
38 | |
39 $(HTMLDIR)/index.html: documentation.xml $(CHUNK_XSL_DEPS) | |
19 @if test "$(HTMLDIR)" = "" ; then echo "Error: HTMLDIR not set!!!"; echo "Typically this means, that you've run make from subdir of DOCS/xml. Don't do this!" ; false; fi | 40 @if test "$(HTMLDIR)" = "" ; then echo "Error: HTMLDIR not set!!!"; echo "Typically this means, that you've run make from subdir of DOCS/xml. Don't do this!" ; false; fi |
20 if test "$(USE_SYMLINKS)" = "yes" ; then for file in ../en/*.xml ; do if ! test -r `basename $$file` ; then ln -s $$file `basename $$file` ; fi ; done ; fi | 41 if test "$(USE_SYMLINKS)" = "yes" ; then for file in ../en/*.xml ; do if ! test -r `basename $$file` ; then ln -s $$file `basename $$file` ; fi ; done ; fi |
21 -rm -f $(HTMLDIR)/* | 42 -rm -f $(HTMLDIR)/* |
22 ../xmllint.sh $< | 43 ../xmllint.sh $< |
23 cp $(HTML_STYLESHEET) $(HTMLDIR)/ | 44 cp $(HTML_STYLESHEET) $(HTMLDIR)/ |
24 ../xsltproc.sh $(HTMLDIR)/ $(HTML_XSL) $< | 45 ../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $< |
46 | |
47 $(HTMLFILE): documentation.xml $(XSL_DEPS) | |
48 @if test "$(HTMLFILE)" = "" ; then echo "Error: HTMLFILE not set!!!"; echo "Typically this means, that you've run make from subdir of DOCS/xml. Don't do this!" ; false; fi | |
49 if test "$(USE_SYMLINKS)" = "yes" ; then for file in ../en/*.xml ; do if ! test -r `basename $$file` ; then ln -s $$file `basename $$file` ; fi ; done ; fi | |
50 -rm -f $(HTMLFILE) | |
51 ../xmllint.sh $< | |
52 cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)` | |
53 ../xsltproc.sh $(HTMLFILE) $(HTML_XSL) $< | |
25 | 54 |
26 ../html.xsl: | 55 ../html.xsl: |
27 cd .. && sh configure | 56 cd .. && sh configure |
28 | 57 |
29 distclean: | 58 distclean: |