1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-19 05:41:16 +00:00
mpv/DOCS/xml/Makefile
diego f5e3179c40 DOCS/xml: Get rid of xsltproc wrapper redirection
Run commands directly from make.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31538 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:42 +02:00

69 lines
2.2 KiB
Makefile

# Makefile for generating the HTML documentation
include ../../config.mak
include xml.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
help:
@echo "Targets:"
@echo "********"
@echo "all : Build everything for configured languages (default)."
@echo "html-single : HTML documentation for configured languages (single file)"
@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 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: $(addprefix html-chunked-,$(DOC_LANGS))
html-single: $(addprefix html-single-,$(DOC_LANGS))
xmllint: $(addprefix xmllint-,$(DOC_LANGS))
$(CONFIGURE_GENERATED) $(MAIN_XML_ALL):
./configure
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)
releaseclean:
-rm -f $(CONFIGURE_GENERATED)
-rm -f $(MAIN_XML_ALL)
distclean: clean releaseclean
.PHONY: all help html-chunked html-single xmllint
.PHONY: html-chunked-* html-single-* xmllint-* *clean