From a725639c9354c30db3f608c17eb54e1e77359815 Mon Sep 17 00:00:00 2001 From: wight Date: Sun, 8 Aug 2004 18:23:04 +0000 Subject: 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 --- DOCS/xml/Makefile.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'DOCS/xml/Makefile.inc') diff --git a/DOCS/xml/Makefile.inc b/DOCS/xml/Makefile.inc index 0cc7a937b3..dd8530e3ab 100644 --- a/DOCS/xml/Makefile.inc +++ b/DOCS/xml/Makefile.inc @@ -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` ; \ -- cgit v1.2.3