changeset 12969:e589db41eb34

Make symlinks behavior more sensible - regenerate symlinks (and documentation) only when it is needed.
author wight
date Sun, 08 Aug 2004 18:23:04 +0000
parents 55e13005ac30
children 2b57ae8d21dd
files DOCS/xml/Makefile.inc
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/xml/Makefile.inc	Sat Aug 07 23:48:35 2004 +0000
+++ b/DOCS/xml/Makefile.inc	Sun Aug 08 18:23:04 2004 +0000
@@ -35,7 +35,9 @@
 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 @@
 	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 @@
 ../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` ; \