[MPlayer-DOCS] Problem compiling DOCS
Torinthiel
torinthiel at wp.pl
Sun Jan 25 21:20:41 CET 2004
On Sun, Jan 25, 2004 at 09:48:42AM +0100, Torinthiel wrote:
> I'll try to make a draft this afternoon.
Here it is. I think we should also rename SUBDIRS variable to LANGUAGES.
It adds possibility to make only one language at a time and even make -j works ;).
BTW, how about moving symlinks generation in Makefile.inc to separate
target? Less error-prone if we are ever to change it.
Torinthiel
--
Waclaw "Torinthiel" Schiller GG#: 542916, 3073512
torinthiel(at)wp(dot)pl
gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8 7346 2B6E 39F2 B069 01F1
"No classmates may be used during this examination"
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile 24 Jan 2004 22:31:11 -0000 1.17
+++ Makefile 25 Jan 2004 20:17:12 -0000
@@ -18,29 +18,25 @@
@echo "********"
@echo "all : Build everything (default)."
@echo "html-single : Build HTML documentation (single file)."
+ @echo "html-LANG-single : As above, but only one language."
@echo "html-chunked : Build HTML documentation (multiple files)."
+ @echo "html-LANG-chunked : As above, but only one language."
@echo "clean-html-single : Purge the 'HTML-single' directory."
@echo "clean-html-chunked: Purge the 'HTML' directory."
@echo "clean : Purge the 'HTML' and 'HTML-single' directories."
@echo "distclean : Remove ALL generated files."
+ @echo "distclean-LANG : Remove ALL generated files in one language"
+ @echo "Substitute LANG for one of $(SUBDIRS)"
-.PHONY: html-chunked
-html-chunked: xsltproc.sh xmllint.sh
+.PHONY: html-chunked chunked-dir
+html-chunked: xsltproc.sh xmllint.sh chunked-dir $(addsuffix -chunked,$(SUBDIRS))
+chunked-dir:
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) &&\
- if $(MAKE) HTMLDIR=../$(HTML_CHUNKED)/$$dir -C $$dir html-chunked; then :; else exit 1; fi;\
- done
-.PHONY: html-single
-html-single: xsltproc.sh xmllint.sh
+.PHONY: html-single single-dir
+html-single: xsltproc.sh xmllint.sh single-dir $(addsuffix -single,$(SUBDIRS))
+single-dir:
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) &&\
- if $(MAKE) HTMLFILE=../$(HTML_SINGLE)/$$dir/MPlayer.html -C $$dir html-single; then :; else exit 1; fi;\
- done
.PHONY: clean-html-chunked
clean-html-chunked:
@@ -51,14 +47,27 @@
-rm -rf $(HTML_SINGLE)
.PHONY: distclean
-distclean: clean-html-chunked clean-html-single
- for dir in $(SUBDIRS); do\
- test -f $$dir/Makefile &&\
- if $(MAKE) HTMLDIR=../$(HTML_CHUNKED)/$$dir -C $$dir distclean ; then :; else exit 1; fi;\
- done
+distclean: clean-html-chunked clean-html-single $(addprefix distclean-,$(SUBDIRS))
-rm -f html-chunk.xsl html-single.xsl xsltproc.sh xmllint.sh
xsltproc.sh xmllint.sh:
sh configure
clean: clean-html-chunked clean-html-single
+
+define lang-def
+.PHONY: $(1)-single $(1)-chunked distclean-$(1)
+$(1)-single: xsltproc.sh xmllint.sh single-dir
+ (test -d $(HTML_SINGLE)/$(1) || mkdir $(HTML_SINGLE)/$(1))
+ $(MAKE) HTMLFILE=../$(HTML_SINGLE)/$(1)/MPlayer.html -C $(1) html-single
+
+$(1)-chunked: xsltproc.sh xmllint.sh chunked-dir
+ (test -d $(HTML_CHUNKED)/$(1) || mkdir $(HTML_CHUNKED)/$(1))
+ $(MAKE) HTMLDIR=../$(HTML_CHUNKED)/$(1) -C $(1) html-chunked
+
+distclean-$(1):
+ -rm -rf $(HTML_SINGLE)/$(1) $(HTML_CHUNKED)/$(1)
+ $(MAKE) HTMLDIR=../$(HTML_CHUNKED)/$(1) -C $(1) distclean
+endef
+
+$(foreach lang, $(SUBDIRS),$(eval $(call lang-def,$(lang))))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-docs/attachments/20040125/c265c7a1/attachment.pgp>
More information about the MPlayer-DOCS
mailing list