Make symlinks behavior more sensible - regenerate symlinks (and documentation)

only when it is needed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12970 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
wight 2004-08-08 18:23:04 +00:00
parent 0ec2337e13
commit a725639c93
1 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,9 @@ all: html-chunked html-single
html-chunked: $(HTMLDIR)/index.html
html-single: $(HTMLFILE)
$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(if $(findstring yes,$(USE_SYMLINKS)),symlinks)
SYMLINKS_DEPS:=$(if $(findstring yes,$(USE_SYMLINKS)), $(patsubst ../en/%,%,$(wildcard ../en/*.xml)))
$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS)
ifndef HTMLDIR
$(warning $(HTMLDIR))
$(warning Error: HTMLDIR not set!!!)
@ -47,7 +49,7 @@ endif
cp -f $(HTML_STYLESHEET) $(HTMLDIR)/
../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
$(HTMLFILE): main.xml $(XSL_DEPS) $(if $(findstring yes,$(USE_SYMLINKS)),symlinks)
$(HTMLFILE): main.xml $(XSL_DEPS) $(SYMLINKS_DEPS)
ifndef HTMLFILE
$(warning Error: HTMLFILE not set!!!)
$(warning Typically this means, that you've run make from a subdir of DOCS/xml.)
@ -61,8 +63,8 @@ endif
../html-chunk.xsl ../html-single.xsl main.xml:
cd .. && sh configure
.PHONY: symlinks
symlinks:
$(filter-out main.xml, $(patsubst ../en/%,%, $(wildcard ../en/*.xml))):
$(if $(findstring yes,$(USE_SYMLINKS)), ,exit 0;)\
for file in ../en/*.xml ; do \
if ! test -r `basename $$file` ; then \
ln -s $$file `basename $$file` ; \