[MPlayer-DOCS] CVS: main/DOCS/xml Makefile.inc,1.15,1.16

Torinthiel CVS wight at mplayerhq.hu
Fri Jan 30 12:40:57 CET 2004


Update of /cvsroot/mplayer/main/DOCS/xml
In directory mail:/var2/tmp/cvs-serv32095

Modified Files:
	Makefile.inc 
Log Message:
Move symlinks to a separate target

Index: Makefile.inc
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/Makefile.inc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Makefile.inc	30 Jan 2004 08:40:47 -0000	1.15
+++ Makefile.inc	30 Jan 2004 11:40:54 -0000	1.16
@@ -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 \




More information about the MPlayer-DOCS mailing list