[MPlayer-DOCS] CVS: main/DOCS/xml Makefile, 1.14, 1.15 Makefile.inc, 1.12, 1.13 configure, 1.8, 1.9

Diego Biurrun CVS diego at mplayerhq.hu
Wed Jan 21 00:27:27 CET 2004


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

Modified Files:
	Makefile Makefile.inc configure 
Log Message:
Shiny new build system by Torinthiel, polished and improved by myself.


Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/Makefile,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Makefile	16 Nov 2003 00:57:47 -0000	1.14
+++ Makefile	20 Jan 2004 23:27:24 -0000	1.15
@@ -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

Index: Makefile.inc
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/Makefile.inc,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Makefile.inc	25 Nov 2003 12:41:56 -0000	1.12
+++ Makefile.inc	20 Jan 2004 23:27:24 -0000	1.13
@@ -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

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/configure,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- configure	16 Nov 2003 00:57:47 -0000	1.8
+++ configure	20 Jan 2004 23:27:24 -0000	1.9
@@ -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 \$*"




More information about the MPlayer-DOCS mailing list