From 4d671efb4abcc8c1b6669f295f54e1042bd91b98 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 20 Jan 2004 23:27:25 +0000 Subject: Shiny new build system by Torinthiel, polished and improved by myself. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11818 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/Makefile | 12 ++++++------ DOCS/xml/Makefile.inc | 23 ++++++++++++----------- DOCS/xml/configure | 40 +++++++++++++++++++++++++++++++++++++++- DOCS/xml/en/.cvsignore | 1 + DOCS/xml/en/documentation.xml | 30 ++---------------------------- DOCS/xml/es/.cvsignore | 1 + DOCS/xml/es/documentation.xml | 30 ++---------------------------- DOCS/xml/fr/.cvsignore | 1 + DOCS/xml/fr/documentation.xml | 31 ++----------------------------- DOCS/xml/pl/.cvsignore | 1 + DOCS/xml/pl/documentation.xml | 29 +---------------------------- DOCS/xml/ru/.cvsignore | 1 + DOCS/xml/ru/documentation.xml | 30 ++---------------------------- 13 files changed, 71 insertions(+), 159 deletions(-) create mode 100644 DOCS/xml/en/.cvsignore create mode 100644 DOCS/xml/es/.cvsignore create mode 100644 DOCS/xml/fr/.cvsignore create mode 100644 DOCS/xml/pl/.cvsignore create mode 100644 DOCS/xml/ru/.cvsignore (limited to 'DOCS') diff --git a/DOCS/xml/Makefile b/DOCS/xml/Makefile index 2c802a9b01..74230e2ef1 100644 --- a/DOCS/xml/Makefile +++ b/DOCS/xml/Makefile @@ -26,7 +26,7 @@ help: .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 @@ build-html-chunked: xsltproc.sh xmllint.sh .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 @@ build-html-single: xsltproc.sh xmllint.sh .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 @@ distclean: clean-html-chunked clean-html-single 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 diff --git a/DOCS/xml/Makefile.inc b/DOCS/xml/Makefile.inc index 96a38ab463..6c838ff75a 100644 --- a/DOCS/xml/Makefile.inc +++ b/DOCS/xml/Makefile.inc @@ -36,7 +36,7 @@ all: html-chunked html-single 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 @@ $(HTMLDIR)/index.html: documentation.xml $(CHUNK_XSL_DEPS) 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 @@ $(HTMLFILE): documentation.xml $(XSL_DEPS) 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 diff --git a/DOCS/xml/configure b/DOCS/xml/configure index 8492880622..5814c5706a 100755 --- a/DOCS/xml/configure +++ b/DOCS/xml/configure @@ -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 @@ cat > html-single.xsl << EOF 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 + +' >> $lang/main.xml + done + + cat >> $lang/main.xml << EOF +]> + +&documentation.xml; + +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 @@ for _try_xmllint in xmllint 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 \$*" diff --git a/DOCS/xml/en/.cvsignore b/DOCS/xml/en/.cvsignore new file mode 100644 index 0000000000..7a6f9e7c82 --- /dev/null +++ b/DOCS/xml/en/.cvsignore @@ -0,0 +1 @@ +main.xml diff --git a/DOCS/xml/en/documentation.xml b/DOCS/xml/en/documentation.xml index f63e5cc3ba..712685728e 100644 --- a/DOCS/xml/en/documentation.xml +++ b/DOCS/xml/en/documentation.xml @@ -1,31 +1,6 @@ - + - - - - - - - - - - - - - - - - - - - - -]> - - + <application>MPlayer</application> - The Movie Player for LINUX @@ -208,4 +183,3 @@ can be distributed under the terms of the GNU General Public License Version 2. &skin.xml; &users-vs-dev.xml; &patches.xml; - diff --git a/DOCS/xml/es/.cvsignore b/DOCS/xml/es/.cvsignore new file mode 100644 index 0000000000..7a6f9e7c82 --- /dev/null +++ b/DOCS/xml/es/.cvsignore @@ -0,0 +1 @@ +main.xml diff --git a/DOCS/xml/es/documentation.xml b/DOCS/xml/es/documentation.xml index 049cc9dd30..386f2f954f 100644 --- a/DOCS/xml/es/documentation.xml +++ b/DOCS/xml/es/documentation.xml @@ -1,31 +1,6 @@ - + - - - - - - - - - - - - - - - - - - - - -]> - - + MPlayer - El reproductor de Películas para LINUX @@ -209,4 +184,3 @@ License Version 2 (GPL v.2). &skin.xml; &users-vs-dev.xml; &patches.xml; - diff --git a/DOCS/xml/fr/.cvsignore b/DOCS/xml/fr/.cvsignore new file mode 100644 index 0000000000..7a6f9e7c82 --- /dev/null +++ b/DOCS/xml/fr/.cvsignore @@ -0,0 +1 @@ +main.xml diff --git a/DOCS/xml/fr/documentation.xml b/DOCS/xml/fr/documentation.xml index 4774830909..43f7a99a95 100644 --- a/DOCS/xml/fr/documentation.xml +++ b/DOCS/xml/fr/documentation.xml @@ -1,32 +1,6 @@ - + - - - - - - - - - - - - - - - - - - - - - -]> - - + MPlayer - Le lecteur vidéo pour LINUX @@ -204,4 +178,3 @@ peuvent &skin.xml; &users-vs-dev.xml; &patches.xml; - diff --git a/DOCS/xml/pl/.cvsignore b/DOCS/xml/pl/.cvsignore new file mode 100644 index 0000000000..7a6f9e7c82 --- /dev/null +++ b/DOCS/xml/pl/.cvsignore @@ -0,0 +1 @@ +main.xml diff --git a/DOCS/xml/pl/documentation.xml b/DOCS/xml/pl/documentation.xml index 7c02a3eb59..1d59edea58 100644 --- a/DOCS/xml/pl/documentation.xml +++ b/DOCS/xml/pl/documentation.xml @@ -1,31 +1,5 @@ - + - - - - - - - - - - - - - - - - - - - - -]> - - <application>MPlayer</application> - Odtwarzacz filmów dla LINUKSA @@ -215,4 +189,3 @@ mog &skin.xml; &users-vs-dev.xml; &patches.xml; - diff --git a/DOCS/xml/ru/.cvsignore b/DOCS/xml/ru/.cvsignore new file mode 100644 index 0000000000..7a6f9e7c82 --- /dev/null +++ b/DOCS/xml/ru/.cvsignore @@ -0,0 +1 @@ +main.xml diff --git a/DOCS/xml/ru/documentation.xml b/DOCS/xml/ru/documentation.xml index ca50c7dbb5..6f79d81e65 100644 --- a/DOCS/xml/ru/documentation.xml +++ b/DOCS/xml/ru/documentation.xml @@ -1,31 +1,6 @@ - + - - - - - - - - - - - - - - - - - - - - - -]> - + <application>MPlayer</application> - The Movie Player for LINUX @@ -211,4 +186,3 @@ Public License Version 2. &skin.xml; &users-vs-dev.xml; &patches.xml; - -- cgit v1.2.3