From 113f5161899d1f7e803fa99bec0730bd7c52bcab Mon Sep 17 00:00:00 2001 From: wight Date: Fri, 30 Jan 2004 11:40:54 +0000 Subject: Move symlinks to a separate target git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11894 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/Makefile.inc | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'DOCS') diff --git a/DOCS/xml/Makefile.inc b/DOCS/xml/Makefile.inc index 4ae7c65b24..0cc7a937b3 100644 --- a/DOCS/xml/Makefile.inc +++ b/DOCS/xml/Makefile.inc @@ -35,38 +35,24 @@ all: html-chunked html-single 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 @@ endif ../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 \ -- cgit v1.2.3