changeset 11817:19919e913e3d

Shiny new build system by Torinthiel, polished and improved by myself.
author diego
date Tue, 20 Jan 2004 23:27:25 +0000
parents 637af9175b65
children c219c245aa50
files DOCS/xml/Makefile DOCS/xml/Makefile.inc DOCS/xml/configure DOCS/xml/en/.cvsignore DOCS/xml/en/documentation.xml DOCS/xml/es/.cvsignore DOCS/xml/es/documentation.xml DOCS/xml/fr/.cvsignore DOCS/xml/fr/documentation.xml DOCS/xml/pl/.cvsignore DOCS/xml/pl/documentation.xml DOCS/xml/ru/.cvsignore DOCS/xml/ru/documentation.xml
diffstat 13 files changed, 68 insertions(+), 156 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/xml/Makefile	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/Makefile	Tue Jan 20 23:27:25 2004 +0000
@@ -26,7 +26,7 @@
 
 .PHONY: build-html-chunked
 build-html-chunked: xsltproc.sh xmllint.sh
-	test -d $(HTML_CHUNKED) || mkdir $(HTML_CHUNKED)
+	@test -d $(HTML_CHUNKED) || mkdir $(HTML_CHUNKED)
 	@for dir in $(SUBDIRS); do\
 		test -f $$dir/Makefile &&\
 		(test -d $(HTML_CHUNKED)/$$dir || mkdir $(HTML_CHUNKED)/$$dir) &&\
@@ -35,7 +35,7 @@
 
 .PHONY: build-html-single
 build-html-single: xsltproc.sh xmllint.sh
-	test -d $(HTML_SINGLE) || mkdir $(HTML_SINGLE)
+	@test -d $(HTML_SINGLE) || mkdir $(HTML_SINGLE)
 	@for dir in $(SUBDIRS); do\
 		test -f $$dir/Makefile &&\
 		(test -d $(HTML_SINGLE)/$$dir || mkdir $(HTML_SINGLE)/$$dir) &&\
@@ -44,11 +44,11 @@
 
 .PHONY: clean-html-chunked
 clean-html-chunked:
-	-rm -rf $(HTML_CHUNKED)
+	@-rm -rf $(HTML_CHUNKED)
 
 .PHONY: clean-html-single
 clean-html-single:
-	-rm -rf $(HTML_SINGLE)
+	@-rm -rf $(HTML_SINGLE)
 
 .PHONY: distclean
 distclean: clean-html-chunked clean-html-single
@@ -56,9 +56,9 @@
 		test -f $$dir/Makefile &&\
 		if $(MAKE) HTMLDIR=../$(HTML_CHUNKED)/$$dir -C $$dir distclean ; then :; else exit 1; fi;\
 	done
-	-rm -f html-chunk.xsl html-single.xsl xsltproc.sh xmllint.sh
+	@-rm -f html-chunk.xsl html-single.xsl xsltproc.sh xmllint.sh
 
 xsltproc.sh xmllint.sh:
-	sh configure
+	@sh configure
 
 clean: clean-html-chunked clean-html-single
--- a/DOCS/xml/Makefile.inc	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/Makefile.inc	Tue Jan 20 23:27:25 2004 +0000
@@ -36,7 +36,7 @@
 html-chunked: $(HTMLDIR)/index.html
 html-single: $(HTMLFILE)
 
-$(HTMLDIR)/index.html: documentation.xml $(CHUNK_XSL_DEPS)
+$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS)
 	@if test "$(HTMLDIR)" = "" ; then \
 		echo "Error: HTMLDIR not set!!!"; \
 		echo "Typically this means, that you've run make from a subdir of DOCS/xml."; \
@@ -50,12 +50,12 @@
 		fi ; \
 		done ; \
 	fi
-	-rm -f $(HTMLDIR)/*
-	../xmllint.sh $<
-	cp -f $(HTML_STYLESHEET) $(HTMLDIR)/
-	../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
+	@-rm -f $(HTMLDIR)/*
+	@../xmllint.sh $<
+	@cp -f $(HTML_STYLESHEET) $(HTMLDIR)/
+	@../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
 
-$(HTMLFILE): documentation.xml $(XSL_DEPS)
+$(HTMLFILE): main.xml $(XSL_DEPS)
 	@if test "$(HTMLFILE)" = "" ; then \
 		echo "Error: HTMLFILE not set!!!"; \
 		echo "Typically this means, that you've run make from a subdir of DOCS/xml."; \
@@ -69,15 +69,16 @@
 		fi ; \
 		done ; \
 	fi
-	-rm -f $(HTMLFILE)
-	../xmllint.sh $<
-	cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)`
-	../xsltproc.sh $(HTMLFILE) $(HTML_SINGLE_XSL) $<
+	@-rm -f $(HTMLFILE)
+	@../xmllint.sh $<
+	@cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)`
+	@../xsltproc.sh $(HTMLFILE) $(HTML_SINGLE_XSL) $<
 
-../html-chunk.xsl ../html-single.xsl:
+../html-chunk.xsl ../html-single.xsl main.xml:
 	cd .. && sh configure
 
 distclean:
+	@rm -f main.xml
 	@if test "$(USE_SYMLINKS)" = "yes" ; then \
 		rm -f `find *.xml -type l`; \
 	fi
--- a/DOCS/xml/configure	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/configure	Tue Jan 20 23:27:25 2004 +0000
@@ -6,6 +6,7 @@
 _xsltwrapper="xsltproc.sh"
 _xmllintwrapper="xmllint.sh"
 
+echo "Searching for XML catalogs..."
 for _try_catalog in /etc/sgml/catalog /usr/share/sgml/docbook/xml-dtd-4.1.2/xmlcatalog /usr/share/apps/ksgmltools2/customization/en/catalog /usr/share/sgml/catalog /usr/local/share/sgml/catalog /usr/lib/sgml/catalog /usr/local/lib/sgml/catalog /usr/share/docbook-xml42/catalog.xml /usr/share/sgml/docbook/xmlcatalog
 do
   if test -f "$_try_catalog"
@@ -93,7 +94,44 @@
 </xsl:stylesheet>
 EOF
 
+echo "Searching for DTD..."
+for _try_dtd in /usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd /usr/share/docbook-xml42/docbookx.dtd /usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd
+do
+  if test -f "$_try_dtd"
+  then
+    _dtd=$_try_dtd
+    break
+  fi
+done
 
+if test -z "$_dtd"
+then
+  _dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd
+  echo "Not found. Using default ($_dtd)."
+else
+  echo "Found docbookx.dtd at $_dtd"
+fi
+
+for lang in `grep 'SUBDIRS =' Makefile|cut -d= -f2`; do
+  cat > $lang/main.xml << EOF
+<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "$_dtd"
+[ 
+EOF
+
+  for file in `find $lang en -name \*.xml -exec basename \{\} \; | uniq`; do
+    echo '<!ENTITY '$file'	SYSTEM "'$file'">' >> $lang/main.xml
+  done
+
+  cat >> $lang/main.xml << EOF
+]>
+<book id="index" lang="$lang">
+&documentation.xml;
+</book>
+EOF
+
+done
 
 echo "Looking for a valid XSLT processor..."
 # Checks for xsltproc, then checks for the Saxon processor (it needs Java).
@@ -250,7 +288,7 @@
 do
   if command -v $_try_xmllint > /dev/null 2>&1
   then
-    echo "Found: $_try_xmllint"
+    echo "Found $_try_xmllint"
     if test -n "$_catalog"
     then
       _xmllint_command="$_try_xmllint --noout --noent --postvalid --catalogs \$*"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DOCS/xml/en/.cvsignore	Tue Jan 20 23:27:25 2004 +0000
@@ -0,0 +1,1 @@
+main.xml
--- a/DOCS/xml/en/documentation.xml	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/en/documentation.xml	Tue Jan 20 23:27:25 2004 +0000
@@ -1,31 +1,6 @@
-<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<?xml version="1.0" encoding="iso-8859-1"?>
 <!-- $Revision$ -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-	"/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd"
-[
-<!ENTITY audio.xml		SYSTEM "audio.xml">
-<!ENTITY bugreports.xml		SYSTEM "bugreports.xml">
-<!ENTITY bugs.xml		SYSTEM "bugs.xml">
-<!ENTITY cd-dvd.xml		SYSTEM "cd-dvd.xml">
-<!ENTITY codecs.xml		SYSTEM "codecs.xml">
-<!ENTITY faq.xml		SYSTEM "faq.xml">
-<!ENTITY features.xml		SYSTEM "features.xml">
-<!ENTITY formats.xml		SYSTEM "formats.xml">
-<!ENTITY history.xml		SYSTEM "history.xml">
-<!ENTITY install.xml		SYSTEM "install.xml">
-<!ENTITY mail-lists.xml		SYSTEM "mail-lists.xml">
-<!ENTITY mencoder.xml		SYSTEM "mencoder.xml">
-<!ENTITY patches.xml		SYSTEM "patches.xml">
-<!ENTITY ports.xml		SYSTEM "ports.xml">
-<!ENTITY skin.xml		SYSTEM "skin.xml">
-<!ENTITY tvinput.xml		SYSTEM "tvinput.xml">
-<!ENTITY usage.xml		SYSTEM "usage.xml">
-<!ENTITY users-vs-dev.xml	SYSTEM "users-vs-dev.xml">
-<!ENTITY video-filters.xml	SYSTEM "video-filters.xml">
-<!ENTITY video.xml		SYSTEM "video.xml">
-]>
 
-<book id="index" lang="en">
 <bookinfo id="toc">
 <title><application>MPlayer</application> - The Movie Player for LINUX</title>
 <subtitle><ulink url="http://www.mplayerhq.hu"></ulink></subtitle>
@@ -208,4 +183,3 @@
 &skin.xml;
 &users-vs-dev.xml;
 &patches.xml;
-</book>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DOCS/xml/es/.cvsignore	Tue Jan 20 23:27:25 2004 +0000
@@ -0,0 +1,1 @@
+main.xml
--- a/DOCS/xml/es/documentation.xml	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/es/documentation.xml	Tue Jan 20 23:27:25 2004 +0000
@@ -1,31 +1,6 @@
-<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<?xml version="1.0" encoding="iso-8859-1"?>
 <!-- synced with 1.8 -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-	"/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd"
-[
-<!ENTITY audio.xml		SYSTEM "audio.xml">
-<!ENTITY bugreports.xml		SYSTEM "bugreports.xml">
-<!ENTITY bugs.xml		SYSTEM "bugs.xml">
-<!ENTITY cd-dvd.xml		SYSTEM "cd-dvd.xml">
-<!ENTITY codecs.xml		SYSTEM "codecs.xml">
-<!ENTITY faq.xml		SYSTEM "faq.xml">
-<!ENTITY features.xml		SYSTEM "features.xml">
-<!ENTITY formats.xml		SYSTEM "formats.xml">
-<!ENTITY history.xml		SYSTEM "history.xml">
-<!ENTITY install.xml		SYSTEM "install.xml">
-<!ENTITY mail-lists.xml		SYSTEM "mail-lists.xml">
-<!ENTITY mencoder.xml		SYSTEM "mencoder.xml">
-<!ENTITY patches.xml		SYSTEM "patches.xml">
-<!ENTITY ports.xml		SYSTEM "ports.xml">
-<!ENTITY skin.xml		SYSTEM "skin.xml">
-<!ENTITY tvinput.xml		SYSTEM "tvinput.xml">
-<!ENTITY usage.xml		SYSTEM "usage.xml">
-<!ENTITY users-vs-dev.xml	SYSTEM "users-vs-dev.xml">
-<!ENTITY video-filters.xml	SYSTEM "video-filters.xml">
-<!ENTITY video.xml		SYSTEM "video.xml">
-]>
 
-<book lang="es">
 <bookinfo id="toc">
 <title>MPlayer - El reproductor de Películas para LINUX</title>
 <subtitle><ulink url="http://www.mplayerhq.hu"></ulink></subtitle>
@@ -209,4 +184,3 @@
 &skin.xml;
 &users-vs-dev.xml;
 &patches.xml;
-</book>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DOCS/xml/fr/.cvsignore	Tue Jan 20 23:27:25 2004 +0000
@@ -0,0 +1,1 @@
+main.xml
--- a/DOCS/xml/fr/documentation.xml	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/fr/documentation.xml	Tue Jan 20 23:27:25 2004 +0000
@@ -1,32 +1,6 @@
-<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<?xml version="1.0" encoding="iso-8859-1"?>
 <!-- synced with 1.6 -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-	"/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd"
-[
-<!ENTITY audio.xml		SYSTEM "audio.xml">
-<!ENTITY bugreports.xml		SYSTEM "bugreports.xml">
-<!ENTITY bugs.xml		SYSTEM "bugs.xml">
-<!ENTITY cd-dvd.xml		SYSTEM "cd-dvd.xml">
-<!ENTITY codecs.xml		SYSTEM "codecs.xml">
-<!ENTITY edl.xml		SYSTEM "edl.xml">
-<!ENTITY faq.xml		SYSTEM "faq.xml">
-<!ENTITY features.xml		SYSTEM "features.xml">
-<!ENTITY formats.xml		SYSTEM "formats.xml">
-<!ENTITY history.xml		SYSTEM "history.xml">
-<!ENTITY install.xml		SYSTEM "install.xml">
-<!ENTITY mail-lists.xml		SYSTEM "mail-lists.xml">
-<!ENTITY mencoder.xml		SYSTEM "mencoder.xml">
-<!ENTITY patches.xml		SYSTEM "patches.xml">
-<!ENTITY ports.xml		SYSTEM "ports.xml">
-<!ENTITY skin.xml		SYSTEM "skin.xml">
-<!ENTITY tvinput.xml		SYSTEM "tvinput.xml">
-<!ENTITY usage.xml		SYSTEM "usage.xml">
-<!ENTITY users-vs-dev.xml	SYSTEM "users-vs-dev.xml">
-<!ENTITY video-filters.xml	SYSTEM "video-filters.xml">
-<!ENTITY video.xml		SYSTEM "video.xml">
-]>
 
-<book id="index" lang="fr">
 <bookinfo id="toc">
 <title>MPlayer - Le lecteur vidéo pour LINUX</title>
 <subtitle><ulink url="http://www.mplayerhq.hu"></ulink></subtitle>
@@ -204,4 +178,3 @@
 &skin.xml;
 &users-vs-dev.xml;
 &patches.xml;
-</book>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DOCS/xml/pl/.cvsignore	Tue Jan 20 23:27:25 2004 +0000
@@ -0,0 +1,1 @@
+main.xml
--- a/DOCS/xml/pl/documentation.xml	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/pl/documentation.xml	Tue Jan 20 23:27:25 2004 +0000
@@ -1,31 +1,5 @@
-<?xml version="1.0" encoding="iso-8859-2" standalone="no"?>
+<?xml version="1.0" encoding="iso-8859-2"?>
 <!-- synced with 1.8 -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-	"/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd"
-[
-<!ENTITY audio.xml		SYSTEM "audio.xml">
-<!ENTITY bugreports.xml		SYSTEM "bugreports.xml">
-<!ENTITY bugs.xml		SYSTEM "bugs.xml">
-<!ENTITY cd-dvd.xml		SYSTEM "cd-dvd.xml">
-<!ENTITY codecs.xml		SYSTEM "codecs.xml">
-<!ENTITY faq.xml		SYSTEM "faq.xml">
-<!ENTITY features.xml		SYSTEM "features.xml">
-<!ENTITY formats.xml		SYSTEM "formats.xml">
-<!ENTITY history.xml		SYSTEM "history.xml">
-<!ENTITY install.xml		SYSTEM "install.xml">
-<!ENTITY mail-lists.xml		SYSTEM "mail-lists.xml">
-<!ENTITY mencoder.xml		SYSTEM "mencoder.xml">
-<!ENTITY patches.xml		SYSTEM "patches.xml">
-<!ENTITY ports.xml		SYSTEM "ports.xml">
-<!ENTITY skin.xml		SYSTEM "skin.xml">
-<!ENTITY tvinput.xml		SYSTEM "tvinput.xml">
-<!ENTITY usage.xml		SYSTEM "usage.xml">
-<!ENTITY users-vs-dev.xml	SYSTEM "users-vs-dev.xml">
-<!ENTITY video-filters.xml	SYSTEM "video-filters.xml">
-<!ENTITY video.xml		SYSTEM "video.xml">
-]>
-
-<book id="index" lang="pl">
 <bookinfo id="toc">
 <title><application>MPlayer</application> - Odtwarzacz filmów dla LINUKSA</title>
 <subtitle><ulink url="http://www.mplayerhq.hu"></ulink></subtitle>
@@ -215,4 +189,3 @@
 &skin.xml;
 &users-vs-dev.xml;
 &patches.xml;
-</book>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DOCS/xml/ru/.cvsignore	Tue Jan 20 23:27:25 2004 +0000
@@ -0,0 +1,1 @@
+main.xml
--- a/DOCS/xml/ru/documentation.xml	Tue Jan 20 19:28:35 2004 +0000
+++ b/DOCS/xml/ru/documentation.xml	Tue Jan 20 23:27:25 2004 +0000
@@ -1,31 +1,6 @@
-<?xml version="1.0" encoding="KOI8-R" standalone="no"?>
+<?xml version="1.0" encoding="KOI8-R"?>
 <!-- synced with 1.7 -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-	"/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd"
-[
-<!ENTITY audio.xml		SYSTEM "audio.xml">
-<!ENTITY bugreports.xml		SYSTEM "bugreports.xml">
-<!ENTITY bugs.xml		SYSTEM "bugs.xml">
-<!ENTITY cd-dvd.xml		SYSTEM "cd-dvd.xml">
-<!ENTITY codecs.xml		SYSTEM "codecs.xml">
-<!ENTITY edl.xml		SYSTEM "edl.xml">
-<!ENTITY faq.xml		SYSTEM "faq.xml">
-<!ENTITY features.xml		SYSTEM "features.xml">
-<!ENTITY formats.xml		SYSTEM "formats.xml">
-<!ENTITY history.xml		SYSTEM "history.xml">
-<!ENTITY install.xml		SYSTEM "install.xml">
-<!ENTITY mail-lists.xml		SYSTEM "mail-lists.xml">
-<!ENTITY mencoder.xml		SYSTEM "mencoder.xml">
-<!ENTITY patches.xml		SYSTEM "patches.xml">
-<!ENTITY ports.xml		SYSTEM "ports.xml">
-<!ENTITY skin.xml		SYSTEM "skin.xml">
-<!ENTITY tvinput.xml		SYSTEM "tvinput.xml">
-<!ENTITY usage.xml		SYSTEM "usage.xml">
-<!ENTITY users-vs-dev.xml	SYSTEM "users-vs-dev.xml">
-<!ENTITY video-filters.xml	SYSTEM "video-filters.xml">
-<!ENTITY video.xml		SYSTEM "video.xml">
-]>
-<book id="index" lang="ru">
+
 <bookinfo id="toc">
 <title><application>MPlayer</application> - The Movie Player for LINUX</title>
 <subtitle><ulink url="http://www.mplayerhq.hu"></ulink></subtitle>
@@ -211,4 +186,3 @@
 &skin.xml;
 &users-vs-dev.xml;
 &patches.xml;
-</book>