Simplifications and bug fixes by Torinthiel.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11888 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2004-01-30 08:40:47 +00:00
parent df5c60506d
commit ef80b86405
1 changed files with 20 additions and 22 deletions

View File

@ -4,13 +4,15 @@
# Use customized html-chunk.xsl and/or html-single.xsl file if they exist... # Use customized html-chunk.xsl and/or html-single.xsl file if they exist...
# Also add html-common.xsl to depends if it exists. # Also add html-common.xsl to depends if it exists.
ifeq (html-common.xsl,$(wildcard html-common.xsl))
COMMON_XSL_DEPS := html-common.xsl ../html-common.xsl
else
COMMON_XSL_DEPS := ../html-common.xsl
endif
ifeq (html-chunk.xsl,$(wildcard html-chunk.xsl)) ifeq (html-chunk.xsl,$(wildcard html-chunk.xsl))
HTML_CHUNK_XSL := html-chunk.xsl HTML_CHUNK_XSL := html-chunk.xsl
ifeq (html-common.xsl,$(wildcard html-common.xsl)) CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-chunk.xsl $(COMMON_XSL_DEPS)
CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) html-common.xsl ../html-chunk.xsl ../html-common.xsl
else
CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-chunk.xsl ../html-common.xsl
endif
else else
HTML_CHUNK_XSL := ../html-chunk.xsl HTML_CHUNK_XSL := ../html-chunk.xsl
CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-common.xsl CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-common.xsl
@ -18,11 +20,7 @@ endif
ifeq (html-single.xsl,$(wildcard html-single.xsl)) ifeq (html-single.xsl,$(wildcard html-single.xsl))
HTML_SINGLE_XSL := html-single.xsl HTML_SINGLE_XSL := html-single.xsl
ifeq (html-common.xsl,$(wildcard html-common.xsl)) XSL_DEPS := $(HTML_SINGLE_XSL) ../html-single.xsl $(COMMON_XSL_DEPS)
XSL_DEPS := $(HTML_SINGLE_XSL) html-common.xsl ../html-single.xsl ../html-common.xsl
else
XSL_DEPS := $(HTML_SINGLE_XSL) ../html-single.xsl ../html-common.xsl
endif
else else
HTML_SINGLE_XSL := ../html-single.xsl HTML_SINGLE_XSL := ../html-single.xsl
XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl
@ -32,17 +30,18 @@ endif
HTML_STYLESHEET ?= ../default.css HTML_STYLESHEET ?= ../default.css
# This is the main target... # This is the main target...
.PHONY: all html-chunked html-single
all: html-chunked html-single all: html-chunked html-single
html-chunked: $(HTMLDIR)/index.html html-chunked: $(HTMLDIR)/index.html
html-single: $(HTMLFILE) html-single: $(HTMLFILE)
$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS)
if test "$(HTMLDIR)" = "" ; then \ ifndef HTMLDIR
echo "Error: HTMLDIR not set!!!"; \ $(warning $(HTMLDIR))
echo "Typically this means, that you've run make from a subdir of DOCS/xml."; \ $(warning Error: HTMLDIR not set!!!)
echo "Don't do this!"; \ $(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
false; \ $(error Don't do this!)
fi endif
if test "$(USE_SYMLINKS)" = "yes" ; then \ if test "$(USE_SYMLINKS)" = "yes" ; then \
for file in ../en/*.xml ; do \ for file in ../en/*.xml ; do \
if ! test -r `basename $$file` ; then \ if ! test -r `basename $$file` ; then \
@ -56,12 +55,11 @@ $(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS)
../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $< ../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
$(HTMLFILE): main.xml $(XSL_DEPS) $(HTMLFILE): main.xml $(XSL_DEPS)
if test "$(HTMLFILE)" = "" ; then \ ifndef HTMLFILE
echo "Error: HTMLFILE not set!!!"; \ $(warning Error: HTMLFILE not set!!!)
echo "Typically this means, that you've run make from a subdir of DOCS/xml."; \ $(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
echo "Don't do this!"; \ $(error Don't do this!)
false; \ endif
fi
if test "$(USE_SYMLINKS)" = "yes" ; then \ if test "$(USE_SYMLINKS)" = "yes" ; then \
for file in ../en/*.xml ; do \ for file in ../en/*.xml ; do \
if ! test -r `basename $$file` ; then \ if ! test -r `basename $$file` ; then \