# HG changeset patch # User wight # Date 1075462854 0 # Node ID cf34e63146bf7456787f2d382b795237720f68aa # Parent c435050928fe9eac7690303f481cbd2b8b8b0532 Move symlinks to a separate target diff -r c435050928fe -r cf34e63146bf DOCS/xml/Makefile.inc --- a/DOCS/xml/Makefile.inc Fri Jan 30 10:36:29 2004 +0000 +++ b/DOCS/xml/Makefile.inc Fri Jan 30 11:40:54 2004 +0000 @@ -35,38 +35,24 @@ html-chunked: $(HTMLDIR)/index.html html-single: $(HTMLFILE) -$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) +$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(if $(findstring yes,$(USE_SYMLINKS)),symlinks) 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 - if test "$(USE_SYMLINKS)" = "yes" ; then \ - for file in ../en/*.xml ; do \ - if ! test -r `basename $$file` ; then \ - ln -s $$file `basename $$file` ; \ - fi ; \ - done ; \ - fi -rm -f $(HTMLDIR)/* ../xmllint.sh $< cp -f $(HTML_STYLESHEET) $(HTMLDIR)/ ../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $< -$(HTMLFILE): main.xml $(XSL_DEPS) +$(HTMLFILE): main.xml $(XSL_DEPS) $(if $(findstring yes,$(USE_SYMLINKS)),symlinks) 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 - if test "$(USE_SYMLINKS)" = "yes" ; then \ - for file in ../en/*.xml ; do \ - if ! test -r `basename $$file` ; then \ - ln -s $$file `basename $$file` ; \ - fi ; \ - done ; \ - fi -rm -f $(HTMLFILE) ../xmllint.sh $< cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)` @@ -75,6 +61,14 @@ ../html-chunk.xsl ../html-single.xsl main.xml: cd .. && sh configure +.PHONY: symlinks +symlinks: + for file in ../en/*.xml ; do \ + if ! test -r `basename $$file` ; then \ + ln -s $$file `basename $$file` ; \ + fi; \ + done + distclean: rm -f main.xml if test "$(USE_SYMLINKS)" = "yes" ; then \