# HG changeset patch # User diego # Date 1320695680 0 # Node ID 91794b4aa5d09b5efde1c2914cffd4498c1317fb # Parent 4ec96d5d2e4ccf3a7f3dd33b55d8dd6f110ca62e build: merge DOCS/xml/Makefile into top-level Makefile diff -r 4ec96d5d2e4c -r 91794b4aa5d0 DOCS/tech/translations.txt --- a/DOCS/tech/translations.txt Mon Nov 07 19:54:38 2011 +0000 +++ b/DOCS/tech/translations.txt Mon Nov 07 19:54:40 2011 +0000 @@ -135,7 +135,7 @@ ~~~~~~~~~~~~~~~~~~ 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. diff -r 4ec96d5d2e4c -r 91794b4aa5d0 DOCS/xml/Makefile --- a/DOCS/xml/Makefile Mon Nov 07 19:54:38 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# Makefile for generating the HTML documentation - -include ../../config.mak - -# Generated HTML files go here. -HTML = ../HTML - -MAIN_XML_ALL = $(foreach lang,$(DOC_LANG_ALL),$(lang)/main.xml) -CONFIGURE_GENERATED = html-chunk.xsl html-single.xsl xml.mak - -all: 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): $(HTML)/$(lang)/dummy.html -html-single-$(lang): $(HTML)/$(lang)/MPlayer.html -$(HTML)/$(lang)/dummy.html $(HTML)/$(lang)/MPlayer.html: $(lang)/main.xml $(wildcard $(lang)/*.xml) html-common.xsl $(HTML)/$(lang)/default.css - -$(HTML)/$(lang)/default.css: - mkdir -p $$(@D) - cp -f default.css $$(@D) - -$(HTML)/$(lang)/dummy.html: - SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ html-chunk.xsl $$< - -$(HTML)/$(lang)/MPlayer.html: - SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ html-single.xsl $$< - -xmllint-$(lang): - SGML_CATALOG_FILES=$(CATALOG) $(XMLLINT_COMMAND) $(lang)/main.xml -endef - -$(foreach lang, $(DOC_LANG_ALL),$(eval $(lang-def))) - -clean: - -rm -rf $(HTML) - -distclean: clean - -rm -f $(CONFIGURE_GENERATED) $(MAIN_XML_ALL) - -.PHONY: all html-chunked html-single xmllint -.PHONY: html-chunked-* html-single-* xmllint-* *clean diff -r 4ec96d5d2e4c -r 91794b4aa5d0 DOCS/xml/README --- a/DOCS/xml/README Mon Nov 07 19:54:38 2011 +0000 +++ b/DOCS/xml/README Mon Nov 07 19:54:40 2011 +0000 @@ -23,14 +23,6 @@ Building the documentation ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Before trying to build the documentation, run - - make help - -to see all available build targets and make your choice. If something goes -wrong, check the Configuration section of the toplevel Makefile and adjust -the variables. - The documentation and its translations reside in subdirectories. When building the documentation, the generated HTML files are placed in subdirectories of the 'HTML' directory. diff -r 4ec96d5d2e4c -r 91794b4aa5d0 Makefile --- a/Makefile Mon Nov 07 19:54:38 2011 +0000 +++ b/Makefile Mon Nov 07 19:54:40 2011 +0000 @@ -826,6 +826,38 @@ +###### 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 @@ 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 @@ .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.