2003-03-23 23:26:55 +00:00
|
|
|
#
|
2003-06-18 17:37:36 +00:00
|
|
|
# Makefile.inc for Makefiles in subdirectories.
|
2003-03-23 23:26:55 +00:00
|
|
|
#
|
|
|
|
|
2003-10-21 11:07:02 +00:00
|
|
|
# Use customized html-chunk.xsl and/or html-single.xsl file if they exist...
|
2003-10-20 09:56:48 +00:00
|
|
|
# Also add html-common.xsl to depends if it exists.
|
|
|
|
ifeq (html-common.xsl,$(wildcard html-common.xsl))
|
2004-01-30 08:40:47 +00:00
|
|
|
COMMON_XSL_DEPS := html-common.xsl ../html-common.xsl
|
2003-10-20 09:56:48 +00:00
|
|
|
else
|
2004-01-30 08:40:47 +00:00
|
|
|
COMMON_XSL_DEPS := ../html-common.xsl
|
2003-10-20 09:56:48 +00:00
|
|
|
endif
|
2004-01-30 08:40:47 +00:00
|
|
|
|
|
|
|
ifeq (html-chunk.xsl,$(wildcard html-chunk.xsl))
|
|
|
|
HTML_CHUNK_XSL := html-chunk.xsl
|
|
|
|
CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-chunk.xsl $(COMMON_XSL_DEPS)
|
2003-10-20 09:56:48 +00:00
|
|
|
else
|
|
|
|
HTML_CHUNK_XSL := ../html-chunk.xsl
|
|
|
|
CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-common.xsl
|
|
|
|
endif
|
|
|
|
|
2003-10-21 11:07:02 +00:00
|
|
|
ifeq (html-single.xsl,$(wildcard html-single.xsl))
|
|
|
|
HTML_SINGLE_XSL := html-single.xsl
|
2004-01-30 08:40:47 +00:00
|
|
|
XSL_DEPS := $(HTML_SINGLE_XSL) ../html-single.xsl $(COMMON_XSL_DEPS)
|
2003-10-21 11:07:02 +00:00
|
|
|
else
|
|
|
|
HTML_SINGLE_XSL := ../html-single.xsl
|
|
|
|
XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl
|
|
|
|
endif
|
|
|
|
|
2003-06-18 17:37:36 +00:00
|
|
|
# Fall back to the default HTML stylesheet if none is specified.
|
2003-03-23 23:26:55 +00:00
|
|
|
HTML_STYLESHEET ?= ../default.css
|
|
|
|
|
|
|
|
# This is the main target...
|
2003-10-21 11:07:02 +00:00
|
|
|
all: html-chunked html-single
|
2003-10-20 09:56:48 +00:00
|
|
|
html-chunked: $(HTMLDIR)/index.html
|
2003-10-21 11:07:02 +00:00
|
|
|
html-single: $(HTMLFILE)
|
2003-10-20 09:56:48 +00:00
|
|
|
|
2004-08-08 18:23:04 +00:00
|
|
|
SYMLINKS_DEPS:=$(if $(findstring yes,$(USE_SYMLINKS)), $(patsubst ../en/%,%,$(wildcard ../en/*.xml)))
|
|
|
|
|
2005-04-11 20:14:08 +00:00
|
|
|
xmllint: main.xml $(SYMLINKS_DEPS)
|
|
|
|
../xmllint.sh $<
|
|
|
|
|
2004-08-08 18:23:04 +00:00
|
|
|
$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS)
|
2004-01-30 08:40:47 +00:00
|
|
|
ifndef HTMLDIR
|
|
|
|
$(warning $(HTMLDIR))
|
|
|
|
$(warning Error: HTMLDIR not set!!!)
|
|
|
|
$(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
|
|
|
|
$(error Don't do this!)
|
|
|
|
endif
|
2004-01-24 22:31:11 +00:00
|
|
|
-rm -f $(HTMLDIR)/*
|
|
|
|
../xmllint.sh $<
|
|
|
|
cp -f $(HTML_STYLESHEET) $(HTMLDIR)/
|
|
|
|
../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
|
2003-10-20 09:56:48 +00:00
|
|
|
|
2004-08-08 18:23:04 +00:00
|
|
|
$(HTMLFILE): main.xml $(XSL_DEPS) $(SYMLINKS_DEPS)
|
2004-01-30 08:40:47 +00:00
|
|
|
ifndef HTMLFILE
|
|
|
|
$(warning Error: HTMLFILE not set!!!)
|
|
|
|
$(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
|
|
|
|
$(error Don't do this!)
|
|
|
|
endif
|
2004-01-24 22:31:11 +00:00
|
|
|
-rm -f $(HTMLFILE)
|
|
|
|
../xmllint.sh $<
|
|
|
|
cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)`
|
|
|
|
../xsltproc.sh $(HTMLFILE) $(HTML_SINGLE_XSL) $<
|
2003-03-23 23:26:55 +00:00
|
|
|
|
2004-01-20 23:27:25 +00:00
|
|
|
../html-chunk.xsl ../html-single.xsl main.xml:
|
2003-10-30 12:10:09 +00:00
|
|
|
cd .. && sh configure
|
2003-10-08 02:00:59 +00:00
|
|
|
|
2004-08-08 18:23:04 +00:00
|
|
|
$(filter-out main.xml, $(patsubst ../en/%,%, $(wildcard ../en/*.xml))):
|
|
|
|
$(if $(findstring yes,$(USE_SYMLINKS)), ,exit 0;)\
|
2004-01-30 11:40:54 +00:00
|
|
|
for file in ../en/*.xml ; do \
|
|
|
|
if ! test -r `basename $$file` ; then \
|
|
|
|
ln -s $$file `basename $$file` ; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
2003-10-08 02:00:59 +00:00
|
|
|
distclean:
|
2004-01-24 22:31:11 +00:00
|
|
|
rm -f main.xml
|
2006-04-17 00:28:36 +00:00
|
|
|
rm -f `find *.xml -type l`;
|
2008-04-22 10:19:30 +00:00
|
|
|
|
|
|
|
.PHONY: all html-chunked html-single xmllint distclean
|