2 # Makefile.inc for Makefiles in subdirectories.
5 # Use customized html-chunk.xsl and/or html-single.xsl file if they exist...
6 # Also add html-common.xsl to depends if it exists.
7 ifeq (html-common.xsl,$(wildcard html-common.xsl))
8 COMMON_XSL_DEPS := html-common.xsl ../html-common.xsl
10 COMMON_XSL_DEPS := ../html-common.xsl
13 ifeq (html-chunk.xsl,$(wildcard html-chunk.xsl))
14 HTML_CHUNK_XSL := html-chunk.xsl
15 CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-chunk.xsl $(COMMON_XSL_DEPS)
17 HTML_CHUNK_XSL := ../html-chunk.xsl
18 CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-common.xsl
21 ifeq (html-single.xsl,$(wildcard html-single.xsl))
22 HTML_SINGLE_XSL := html-single.xsl
23 XSL_DEPS := $(HTML_SINGLE_XSL) ../html-single.xsl $(COMMON_XSL_DEPS)
25 HTML_SINGLE_XSL := ../html-single.xsl
26 XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl
29 # Fall back to the default HTML stylesheet if none is specified.
30 HTML_STYLESHEET ?= ../default.css
32 # This is the main target...
33 all: html-chunked html-single
34 html-chunked: $(HTMLDIR)/index.html
35 html-single: $(HTMLFILE)
37 SYMLINKS_DEPS:=$(if $(findstring yes,$(USE_SYMLINKS)), $(patsubst ../en/%,%,$(wildcard ../en/*.xml)))
39 xmllint: main.xml $(SYMLINKS_DEPS)
42 $(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS)
45 $(warning Error: HTMLDIR not set!!!)
46 $(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
47 $(error Don't do this!)
51 cp -f $(HTML_STYLESHEET) $(HTMLDIR)/
52 ../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
54 $(HTMLFILE): main.xml $(XSL_DEPS) $(SYMLINKS_DEPS)
56 $(warning Error: HTMLFILE not set!!!)
57 $(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
58 $(error Don't do this!)
62 cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)`
63 ../xsltproc.sh $(HTMLFILE) $(HTML_SINGLE_XSL) $<
65 ../html-chunk.xsl ../html-single.xsl main.xml:
68 $(filter-out main.xml, $(patsubst ../en/%,%, $(wildcard ../en/*.xml))):
69 $(if $(findstring yes,$(USE_SYMLINKS)), ,exit 0;)\
70 for file in ../en/*.xml ; do \
71 if ! test -r `basename $$file` ; then \
72 ln -s $$file `basename $$file` ; \
76 .PHONY: all html-chunked html-single xmllint