diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-12-18 18:54:42 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-12-18 18:54:42 +0200 |
commit | efcc9ad7120e01a17fc3659cb0229135b1cebb95 (patch) | |
tree | eb15edb75377eedd5d7397209e8c0d594020663e /DOCS/xml | |
parent | 1598302be65c77c107330dc46fd0dabface3112d (diff) | |
parent | 8fcbe5835d038649e70da410d46c4f5cd502c261 (diff) | |
download | mpv-efcc9ad7120e01a17fc3659cb0229135b1cebb95.tar.bz2 mpv-efcc9ad7120e01a17fc3659cb0229135b1cebb95.tar.xz |
Merge svn changes up to r30055
Diffstat (limited to 'DOCS/xml')
-rw-r--r-- | DOCS/xml/Makefile | 56 | ||||
-rw-r--r-- | DOCS/xml/Makefile.inc | 62 | ||||
-rw-r--r-- | DOCS/xml/README.maintainers | 60 | ||||
-rwxr-xr-x | DOCS/xml/configure | 2 | ||||
-rw-r--r-- | DOCS/xml/cs/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/de/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/en/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/es/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/fr/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/hu/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/it/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/pl/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/pl/html-chunk.xsl | 8 | ||||
-rw-r--r-- | DOCS/xml/pl/html-common.xsl | 15 | ||||
-rw-r--r-- | DOCS/xml/pl/html-single.xsl | 8 | ||||
-rw-r--r-- | DOCS/xml/ru/Makefile | 9 | ||||
-rw-r--r-- | DOCS/xml/zh_CN/Makefile | 9 |
17 files changed, 54 insertions, 247 deletions
diff --git a/DOCS/xml/Makefile b/DOCS/xml/Makefile index 7a90938aef..ed0ec64ed6 100644 --- a/DOCS/xml/Makefile +++ b/DOCS/xml/Makefile @@ -2,11 +2,11 @@ include ../../config.mak -# Generated chunked HTML files go here. -HTML_CHUNKED = ../HTML +# Generated HTML files go here. +HTML = ../HTML -# Generated single HTML files go here. -HTML_SINGLE = ../HTML-single +MAIN_XML_ALL = $(foreach lang,$(DOC_LANG_ALL),$(lang)/main.xml) +CONFIGURE_GENERATED = html-chunk.xsl html-single.xsl xsltproc.sh xmllint.sh all: html-chunked html-single @@ -18,48 +18,48 @@ help: @echo "html-single-LANG : As above, but only one language." @echo "html-chunked : HTML documentation for configured languages (multiple files)" @echo "html-chunked-LANG : As above, but only one language." - @echo "xmllint : Check syntax of all xml files." - @echo "xmllint-LANG : Check syntax of LANG xml files." - @echo "clean : Purge the 'HTML' and 'HTML-single' directories." + @echo "xmllint : Check syntax of XML files for configured languages." + @echo "xmllint-LANG : Check syntax of LANG XML files." + @echo "clean : Purge the 'HTML' directory." @echo "releaseclean : Remove generated files but keep the HTML." @echo "distclean : Remove ALL generated files." @echo "Substitute LANG for one of $(DOC_LANG_ALL)" -html-chunked: xsltproc.sh xmllint.sh $(HTML_CHUNKED) $(addprefix html-chunked-,$(DOC_LANGS)) +html-chunked: $(addprefix html-chunked-,$(DOC_LANGS)) +html-single: $(addprefix html-single-,$(DOC_LANGS)) -html-single: xsltproc.sh xmllint.sh $(HTML_SINGLE) $(addprefix html-single-,$(DOC_LANGS)) +xmllint: $(addprefix xmllint-,$(DOC_LANGS)) -xmllint: xmllint.sh $(addprefix xmllint-,$(DOC_LANG_ALL)) +$(foreach lang,$(DOC_LANG_ALL),$(HTML)/$(lang)): + mkdir -p $@ -$(HTML_CHUNKED) $(HTML_SINGLE): - -mkdir -p $@ - -xsltproc.sh xmllint.sh: +$(CONFIGURE_GENERATED) $(MAIN_XML_ALL): sh configure define lang-def -html-chunked-$(1): xsltproc.sh xmllint.sh $(HTML_CHUNKED) - -mkdir -p $(HTML_CHUNKED)/$(1) - $(MAKE) HTMLDIR=../$(HTML_CHUNKED)/$(1) -C $(1) html-chunked +html-chunked-$(lang) html-single-$(lang): $(HTML)/$(lang) $(CONFIGURE_GENERATED) + +html-chunked-$(lang): + $(MAKE) HTMLDIR=../$$< -C $(lang) html-chunked -html-single-$(1): xsltproc.sh xmllint.sh $(HTML_SINGLE) - -mkdir -p $(HTML_SINGLE)/$(1) - $(MAKE) HTMLFILE=../$(HTML_SINGLE)/$(1)/MPlayer.html -C $(1) html-single +html-single-$(lang): + $(MAKE) HTMLDIR=../$$< -C $(lang) html-single -xmllint-$(1): xmllint.sh - $(MAKE) HTMLFILE=../$(HTML_SINGLE)/$(1)/MPlayer.html -C $(1) xmllint +xmllint-$(lang): xmllint.sh + $(MAKE) -C $(lang) xmllint endef -$(foreach lang, $(DOC_LANG_ALL),$(eval $(call lang-def,$(lang)))) +$(foreach lang, $(DOC_LANG_ALL),$(eval $(lang-def))) clean: - rm -rf $(HTML_CHUNKED) $(HTML_SINGLE) + -rm -rf $(HTML) releaseclean: - rm -f $(foreach lang,$(DOC_LANG_ALL),$(lang)/main.xml) - rm -f $$(find . -name *.xml -type l) - rm -f html-chunk.xsl html-single.xsl xsltproc.sh xmllint.sh + -rm -f $(CONFIGURE_GENERATED) + -rm -f $(MAIN_XML_ALL) + -rm -f $$(find . -name *.xml -type l) distclean: clean releaseclean -.PHONY: all help html-chunked* html-single* xmllint* *clean* +.PHONY: all help html-chunked html-single xmllint +.PHONY: html-chunked-* html-single-* xmllint-* *clean* diff --git a/DOCS/xml/Makefile.inc b/DOCS/xml/Makefile.inc index c7c3252240..33639bed7e 100644 --- a/DOCS/xml/Makefile.inc +++ b/DOCS/xml/Makefile.inc @@ -2,75 +2,35 @@ # Makefile.inc for Makefiles in subdirectories. # -# Use customized html-chunk.xsl and/or html-single.xsl file if they exist... -# Also add html-common.xsl to depends if it exists. -ifeq (html-common.xsl,$(wildcard html-common.xsl)) -COMMON_XSL_DEPS := html-common.xsl ../html-common.xsl -else -COMMON_XSL_DEPS := ../html-common.xsl -endif - -ifeq (html-chunk.xsl,$(wildcard html-chunk.xsl)) -HTML_CHUNK_XSL := html-chunk.xsl -CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-chunk.xsl $(COMMON_XSL_DEPS) -else HTML_CHUNK_XSL := ../html-chunk.xsl CHUNK_XSL_DEPS := $(HTML_CHUNK_XSL) ../html-common.xsl -endif -ifeq (html-single.xsl,$(wildcard html-single.xsl)) -HTML_SINGLE_XSL := html-single.xsl -XSL_DEPS := $(HTML_SINGLE_XSL) ../html-single.xsl $(COMMON_XSL_DEPS) -else HTML_SINGLE_XSL := ../html-single.xsl -XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl -endif - -# Fall back to the default HTML stylesheet if none is specified. -HTML_STYLESHEET ?= ../default.css +SINGLE_XSL_DEPS := $(HTML_SINGLE_XSL) ../html-common.xsl # This is the main target... all: html-chunked html-single html-chunked: $(HTMLDIR)/index.html -html-single: $(HTMLFILE) +html-single: $(HTMLDIR)/MPlayer.html -SYMLINKS_DEPS:=$(if $(findstring yes,$(USE_SYMLINKS)), $(patsubst ../en/%,%,$(wildcard ../en/*.xml))) +SYMLINKS_DEPS := $(filter-out $(wildcard *.xml),$(notdir $(wildcard ../en/*.xml))) xmllint: main.xml $(SYMLINKS_DEPS) ../xmllint.sh $< -$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS) -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 - -rm -f $(HTMLDIR)/* - ../xmllint.sh $< - cp -f $(HTML_STYLESHEET) $(HTMLDIR)/ +$(HTMLDIR)/default.css: + cp -f ../default.css $(@D) + +$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css ../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $< -$(HTMLFILE): main.xml $(XSL_DEPS) $(SYMLINKS_DEPS) -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 - -rm -f $(HTMLFILE) - ../xmllint.sh $< - cp -f $(HTML_STYLESHEET) `dirname $(HTMLFILE)` - ../xsltproc.sh $(HTMLFILE) $(HTML_SINGLE_XSL) $< +$(HTMLDIR)/MPlayer.html: main.xml $(SINGLE_XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css + ../xsltproc.sh $@ $(HTML_SINGLE_XSL) $< ../html-chunk.xsl ../html-single.xsl main.xml: cd .. && sh configure -$(filter-out main.xml, $(patsubst ../en/%,%, $(wildcard ../en/*.xml))): - $(if $(findstring yes,$(USE_SYMLINKS)), ,exit 0;)\ - for file in ../en/*.xml ; do \ - if ! test -r `basename $$file` ; then \ - ln -s $$file `basename $$file` ; \ - fi; \ - done +$(SYMLINKS_DEPS): + ln -s ../en/$@ $@ .PHONY: all html-chunked html-single xmllint diff --git a/DOCS/xml/README.maintainers b/DOCS/xml/README.maintainers index a17617a555..73114f2359 100644 --- a/DOCS/xml/README.maintainers +++ b/DOCS/xml/README.maintainers @@ -2,21 +2,17 @@ The documentation and its translations reside in subdirectories. When building the documentation, the toplevel Makefile goes into the subdirectories listed in the SUBDIRS variable and executes make in each of those directories to create the HTML documentation -in subdirectories of the 'HTML' and 'HTML-single' directories. +in subdirectories of the 'HTML' directory. -IMPORTANT: Do NOT place sensitive files under 'HTML' or 'HTML-single'! +IMPORTANT: Do NOT place sensitive files under 'HTML'! It is for generated documentation only. The whole directory tree is wiped out by the Makefile when running 'make distclean' or 'make clean'. - Also, subdirectories are wiped out one by one before - creating the HTML files. Each subdirectory must have a Makefile. Its purpose is to include the toplevel Makefile.inc file (with the rules to build the docs) and add dependency information to the main target, $(HTMLDIR)/index.html. -The main target usually depends on all the XML and XSL files in the -subdirectory. (Note that the toplevel *.xsl files are added automatically -by Makefile.inc, so you do not have to list them.) +The main target usually depends on all the XML files in the subdirectory. Adding new translations @@ -28,56 +24,8 @@ Adding new translations 2) Make sure to create a 'Makefile' for the translation -- you can use 'en/Makefile' as an example. -3) If you want to use a customized XSL stylesheet, create one and name it - 'html-common.xsl'. Also create two additional XSL stylesheets - ('html-single.xsl' and 'html-chunk.xsl'), with content such as this: - - html-single.xsl: - - <?xml version="1.0" encoding="ISO-8859-1"?> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0"> - - <xsl:import href="../html-single.xsl"/> - <xsl:include href="html-common.xsl"/> - - </xsl:stylesheet> - - html-chunk.xsl: - - <?xml version="1.0" encoding="ISO-8859-1"?> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0"> - - <xsl:import href="../html-chunk.xsl"/> - <xsl:include href="html-common.xsl"/> - - </xsl:stylesheet> - - - Note: You mustn't xsl:include or xsl:import chunk.xsl directly! - Including it can (and will) break building of documentation if chunk.xsl - is installed at a nonstandard location. - -4) If you wish to change the output encoding of generated files, create - html-common.xsl as suggested in step 4) and add strings such as these - somewhere between the <xsl:stylesheet ...> and </xsl:stylesheet> tags - (please, pay attention to quotes): - - <xsl:param name="chunker.output.encoding" select="'your_encoding'"/> - <xsl:output encoding="your_encoding"/> - -5) If you are using your own HTML stylesheet, edit your Makefile and set - the HTML_STYLESHEET variable to its name. Please, don't call your HTML - stylesheet 'default.css'. - -6) In each translated file after the <?xml ... ?> tag you must put a note +3) In each translated file after the <?xml ... ?> tag you must put a note like <!-- synced with r2 -->, where 2 is the revision of corresponding English file (see comment at the top of file). -7) While your translation isn't finished, you can change USE_SYMLINKS - to "yes" in your Makefile. This will help you testing your translation: - English files will be used instead of untranslated ones, when generating - HTML docs. - That's all, in theory. diff --git a/DOCS/xml/configure b/DOCS/xml/configure index d4145ddf4c..b94eebf7e5 100755 --- a/DOCS/xml/configure +++ b/DOCS/xml/configure @@ -181,7 +181,7 @@ echo "Looking for a valid XSLT processor..." # Also checks for Jade/OpenJade. #FIXME: Add support for the xalan/xalan2 XSLT processors. -if xsltproc --version &> /dev/null +if xsltproc --version > /dev/null 2>&1 then if test -z "$_fake_chunk_xsl" then diff --git a/DOCS/xml/cs/Makefile b/DOCS/xml/cs/Makefile index e36fbfffa5..db38611f41 100644 --- a/DOCS/xml/cs/Makefile +++ b/DOCS/xml/cs/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = no - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/de/Makefile b/DOCS/xml/de/Makefile index e18885f6df..db38611f41 100644 --- a/DOCS/xml/de/Makefile +++ b/DOCS/xml/de/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = yes - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/en/Makefile b/DOCS/xml/en/Makefile index e36fbfffa5..db38611f41 100644 --- a/DOCS/xml/en/Makefile +++ b/DOCS/xml/en/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = no - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/es/Makefile b/DOCS/xml/es/Makefile index e18885f6df..db38611f41 100644 --- a/DOCS/xml/es/Makefile +++ b/DOCS/xml/es/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = yes - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/fr/Makefile b/DOCS/xml/fr/Makefile index e36fbfffa5..db38611f41 100644 --- a/DOCS/xml/fr/Makefile +++ b/DOCS/xml/fr/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = no - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/hu/Makefile b/DOCS/xml/hu/Makefile index e18885f6df..db38611f41 100644 --- a/DOCS/xml/hu/Makefile +++ b/DOCS/xml/hu/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = yes - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/it/Makefile b/DOCS/xml/it/Makefile index e18885f6df..db38611f41 100644 --- a/DOCS/xml/it/Makefile +++ b/DOCS/xml/it/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = yes - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/pl/Makefile b/DOCS/xml/pl/Makefile index e36fbfffa5..db38611f41 100644 --- a/DOCS/xml/pl/Makefile +++ b/DOCS/xml/pl/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = no - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/pl/html-chunk.xsl b/DOCS/xml/pl/html-chunk.xsl deleted file mode 100644 index 26cfa2f125..0000000000 --- a/DOCS/xml/pl/html-chunk.xsl +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0"> - - <xsl:import href="../html-chunk.xsl"/> - <xsl:include href="html-common.xsl"/> - -</xsl:stylesheet> diff --git a/DOCS/xml/pl/html-common.xsl b/DOCS/xml/pl/html-common.xsl deleted file mode 100644 index b3c85812ce..0000000000 --- a/DOCS/xml/pl/html-common.xsl +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0"> - - <xsl:param name="local.l10n.xml" select="document('')"/> - <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> - <l:l10n language="pl"> - <l:gentext key="NOTE" text="Informacja"/> - <l:gentext key="Note" text="Informacja"/> - <l:gentext key="note" text="Informacja"/> - </l:l10n> - </l:i18n> - -</xsl:stylesheet> diff --git a/DOCS/xml/pl/html-single.xsl b/DOCS/xml/pl/html-single.xsl deleted file mode 100644 index b263daf761..0000000000 --- a/DOCS/xml/pl/html-single.xsl +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0"> - - <xsl:import href="../html-single.xsl"/> - <xsl:include href="html-common.xsl"/> - -</xsl:stylesheet> diff --git a/DOCS/xml/ru/Makefile b/DOCS/xml/ru/Makefile index e18885f6df..db38611f41 100644 --- a/DOCS/xml/ru/Makefile +++ b/DOCS/xml/ru/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = yes - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc diff --git a/DOCS/xml/zh_CN/Makefile b/DOCS/xml/zh_CN/Makefile index e18885f6df..db38611f41 100644 --- a/DOCS/xml/zh_CN/Makefile +++ b/DOCS/xml/zh_CN/Makefile @@ -1,11 +1,4 @@ -# Set if you are using your own HTML stylesheet... -#HTML_STYLESHEET = mystyle.css - -# Change to yes to enable symlinking missing files to English master versions -USE_SYMLINKS = yes - # Dependency information. -$(HTMLDIR)/index.html: $(wildcard *.xml) -$(HTMLFILE): $(wildcard *.xml) +$(HTMLDIR)/index.html $(HTMLDIR)/MPlayer.html: $(wildcard *.xml) include ../Makefile.inc |