[MPlayer-DOCS] Problem compiling DOCS

Torinthiel torinthiel at wp.pl
Tue Jan 20 15:58:22 CET 2004


On Tue, Jan 20, 2004 at 01:05:18PM +0100, Torinthiel wrote:
> On Tue, Jan 20, 2004 at 07:11:49AM -0300, Diego Biurrun wrote:
> > "?ukasz \"frogu\" Proszek" writes:
> >  > Torinthiel's patch (that one with another main, that you didn't like)
> >  > worked without that symlink.
> > 
> > Just for the record, I've never disliked Torinthiel's patch, just a
> > few implementation details. I'm currently working on it and a modified
> > version will hit CVS soon.
> 
> Wait a moment. I'm working now on a newest version.

And here it is. It applies correctly against current CVS, compiles
correctly and generally is working. It will fail if somebody deletes
file from original directory which is not yet translated (and therefore
symlinked) in another language, but so will the original system. It also
will add an (yet) unnecessary entity when a file is added into English
documentation. This however would have to be added someday and does not
do any bad if it exists before file exists.
Torinthiel

-- 
 Waclaw "Torinthiel" Schiller       GG#: 542916, 3073512
   torinthiel(at)wp(dot)pl
   gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8  7346 2B6E 39F2 B069 01F1
 "No classmates may be used during this examination"
-------------- next part --------------
Index: Makefile.inc
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/Makefile.inc,v
retrieving revision 1.12
diff -u -r1.12 Makefile.inc
--- Makefile.inc	25 Nov 2003 12:41:56 -0000	1.12
+++ Makefile.inc	26 Nov 2003 22:36:33 -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."; \
@@ -55,7 +55,7 @@
 	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."; \
@@ -74,10 +74,11 @@
 	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 main.xml
	@if test "$(USE_SYMLINKS)" = "yes" ; then \
		rm -f `find *.xml -type l`; \
	fi
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/configure,v
retrieving revision 1.8
diff -u -r1.8 configure
--- configure	16 Nov 2003 00:57:47 -0000	1.8
+++ configure	26 Nov 2003 22:36:33 -0000
@@ -93,7 +93,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 -name \*.xml -exec basename \{\} \; ;
+              find en    -name \*.xml -exec basename \{\} \; )| sort | 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).
Index: en/documentation.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/en/documentation.xml,v
retrieving revision 1.6
diff -u -r1.6 documentation.xml
--- en/documentation.xml	21 Sep 2003 13:05:42 -0000	1.6
+++ en/documentation.xml	26 Nov 2003 22:36:33 -0000
@@ -1,31 +1,6 @@
-<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<?xml version="1.0" encoding="iso-8859-1"?>
 <!-- $Revision: 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="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 +182,3 @@
 &skin.xml;
 &users-vs-dev.xml;
 &patches.xml;
-</book>
Index: es/documentation.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/es/documentation.xml,v
retrieving revision 1.6
diff -u -r1.6 documentation.xml
--- es/documentation.xml	8 Oct 2003 01:06:50 -0000	1.6
+++ es/documentation.xml	26 Nov 2003 22:36:33 -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>
Index: fr/documentation.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/fr/documentation.xml,v
retrieving revision 1.5
diff -u -r1.5 documentation.xml
--- fr/documentation.xml	12 Oct 2003 09:46:57 -0000	1.5
+++ fr/documentation.xml	26 Nov 2003 22:36:34 -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>
Index: pl/documentation.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/pl/documentation.xml,v
retrieving revision 1.1
diff -u -r1.1 documentation.xml
--- pl/documentation.xml	15 Oct 2003 16:37:42 -0000	1.1
+++ pl/documentation.xml	26 Nov 2003 22:36:34 -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>
Index: ru/documentation.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/ru/documentation.xml,v
retrieving revision 1.9
diff -u -r1.9 documentation.xml
--- ru/documentation.xml	8 Oct 2003 01:40:57 -0000	1.9
+++ ru/documentation.xml	26 Nov 2003 22:36:34 -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 +185,3 @@
 &skin.xml;
 &users-vs-dev.xml;
 &patches.xml;
-</book>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-docs/attachments/20040120/a8192973/attachment.pgp>


More information about the MPlayer-DOCS mailing list