[MPlayer-cvslog] r34323 - in trunk: DOCS/tech/translations.txt DOCS/xml/Makefile DOCS/xml/README Makefile

diego subversion at mplayerhq.hu
Mon Nov 7 20:54:41 CET 2011


Author: diego
Date: Mon Nov  7 20:54:40 2011
New Revision: 34323

Log:
build: merge DOCS/xml/Makefile into top-level Makefile

Modified:
   trunk/DOCS/tech/translations.txt
   trunk/Makefile

Changes in other areas also in this revision:
Deleted:
   trunk/DOCS/xml/Makefile
Modified:
   trunk/DOCS/xml/README

Modified: trunk/DOCS/tech/translations.txt
==============================================================================
--- trunk/DOCS/tech/translations.txt	Mon Nov  7 20:54:38 2011	(r34322)
+++ trunk/DOCS/tech/translations.txt	Mon Nov  7 20:54:40 2011	(r34323)
@@ -135,7 +135,7 @@ XML documentation:
 ~~~~~~~~~~~~~~~~~~
 
 If you make changes to the XML documentation, doublecheck that the
-documentation still builds by running 'make' in the DOCS/xml/ subdirectory.
+documentation still builds by running 'make doc'.
 
 Place XML files in a new subdirectory named after the language code you are
 translating for. main.xml is autogenerated, do not translate it.

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Mon Nov  7 20:54:38 2011	(r34322)
+++ trunk/Makefile	Mon Nov  7 20:54:40 2011	(r34323)
@@ -826,6 +826,38 @@ checkheaders: $(ALLHEADERS:.h=.ho)
 
 
 
+###### XML documentation ######
+
+doc: html-chunked html-single
+
+html-chunked: $(addprefix html-chunked-,$(DOC_LANGS))
+html-single:  $(addprefix html-single-,$(DOC_LANGS))
+
+xmllint: $(addprefix xmllint-,$(DOC_LANGS))
+
+define lang-def
+html-chunked-$(lang): DOCS/HTML/$(lang)/dummy.html
+html-single-$(lang):  DOCS/HTML/$(lang)/MPlayer.html
+DOCS/HTML/$(lang)/dummy.html DOCS/HTML/$(lang)/MPlayer.html: DOCS/xml/$(lang)/main.xml $(wildcard DOCS/xml/$(lang)/*.xml) DOCS/xml/html-common.xsl DOCS/HTML/$(lang)/default.css
+
+DOCS/HTML/$(lang)/default.css:
+	mkdir -p $$(@D)
+	cp -f DOCS/xml/default.css $$(@D)
+
+DOCS/HTML/$(lang)/dummy.html:
+	SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ DOCS/xml/html-chunk.xsl $$<
+
+DOCS/HTML/$(lang)/MPlayer.html:
+	SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ DOCS/xml/html-single.xsl $$<
+
+xmllint-$(lang):
+	SGML_CATALOG_FILES=$(CATALOG) $(XMLLINT_COMMAND) DOCS/xml/$(lang)/main.xml
+endef
+
+$(foreach lang, $(DOC_LANG_ALL),$(eval $(lang-def)))
+
+
+
 ###### dependency declarations / specific CFLAGS ######
 
 # Make sure all generated header files are created.
@@ -931,7 +963,8 @@ clean:
 
 distclean: clean testsclean toolsclean driversclean dhahelperclean
 	-$(MAKE) -C ffmpeg $@
-	-rm -rf DOCS/tech/doxygen
+	-rm -rf DOCS/tech/doxygen DOCS/HTML
+	-rm -f DOCS/xml/html-chunk.xsl DOCS/xml/html-single.xsl
 	-rm -f $(call ADD_ALL_DIRS,/*.d)
 	-rm -f config.* codecs.conf.h help_mp.h version.h TAGS tags
 	-rm -f $(VIDIX_PCI_FILES)
@@ -1093,6 +1126,7 @@ dhahelperclean:
 
 .PHONY: all doxygen *install* *tools drivers dhahelper*
 .PHONY: checkheaders *clean tests check_checksums
+.PHONY: doc html-chunked* html-single* xmllint*
 
 # Disable suffix rules.  Most of the builtin rules are suffix rules,
 # so this saves some time on slow systems.


More information about the MPlayer-cvslog mailing list