[MPlayer-DOCS] CVS: homepage/essays/src konf2002-Pontscho.src.en, 1.1, 1.2 konf2002.src.en, 1.1, 1.2

Torinthiel torinthiel at megapolis.pl
Sat May 14 23:33:25 CEST 2005


On Sat, May 14, 2005 at 11:14:04PM +0200, Torinthiel wrote:
> Attached version works for me (really this time)

Now this one is even better - it works, and has only one line of
workaround. IT still acts strangely, so probably adding a new
translation/directory (which is easier now by structure) will mess thing
up (i.e. adding 'ESSAYS' to the comment about not removing breaks
things). And guessing by the behaviour I'm not sure if my make doesn't
get used to some things - I could swear at the beginning I needed
comments, which are now gone.
Torinthiel

-- 
 Waclaw "Torinthiel" Schiller       GG#: 542916, 3073512
   torinthiel(at)megapolis(dot)pl
   gpg: 0906A2CE fpr: EE3E DFB4 C4D6 E22E 8999  D714 7CEB CDDC 0906 A2CE
 "No classmates may be used during this examination"
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/homepage/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	14 May 2005 13:38:48 -0000	1.2
+++ Makefile	14 May 2005 21:29:18 -0000
@@ -1,40 +1,43 @@
 DESIGNS := design7 design6 design5 design4 design3
 TRANSLATIONS := es hu pl
+SRCDIRS=src essays/src
 pl_ENCODING := iso-8859-2
 hu_ENCODING := iso-8859-2
 
 ifeq ($(INTERNAL),yes)
 
 SRC2HTML = $(addsuffix $(2).html, $(notdir $(basename $(basename $(1)))))
-PAGES := $(wildcard ../src/*.src.en)
+# Do not remove ESSAYS - I's not used, but it works around GNU make 3.80 bug
 ESSAYS := $(wildcard ../essays/src/*.src.en)
 
 all: en $(TRANSLATIONS)
 
 # The English homepage requires some special treatment
-en: $(call SRC2HTML, $(PAGES) $(ESSAYS))
-$(call SRC2HTML, $(PAGES)): %.html : ../src/%.src.en src/upper src/selector src/lower
-	cat src/upper src/selector $< src/lower > $@
-
-$(call SRC2HTML, $(ESSAYS)): %.html : ../essays/src/%.src.en src/upper src/selector src/lower
-	cat src/upper src/selector $< src/lower > $@
+en: $(call SRC2HTML, $(foreach dir, $(SRCDIRS), $(wildcard ../$(dir)/*.src.en)))
 
+define en-dir-def
+$(call SRC2HTML, $(wildcard ../$(1)/*.src.en)):  %.html : ../$(1)/%.src.en src/upper src/selector src/lower
+	cat src/upper src/selector $$< src/lower > $$@
+endef
+	
 # And the rest of languages...
 define lang-def
-$(1): $(if $(wildcard src/selector-$(1)),$(call SRC2HTML, $(wildcard ../src/*.src.$(1)) $(wildcard ../essays/src/*.src.$(1)),-$(1)))
-$(call SRC2HTML, $(PAGES),-$(1)): %-$(1).html : ../src/%.src.$(1) src/upper src/selector-$(1) src/lower
-	$(if $($(1)_ENCODING),\
-	sed -e '/text\/html/s/iso-8859-1/$($(1)_ENCODING)/' src/upper | \
-	cat - src/selector-$(1) $$< src/lower > $$@,\
-	cat src/upper src/selector-$(1) $$< src/lower > $$@)
-$(call SRC2HTML, $(ESSAYS),-$(1)): %-$(1).html : ../essays/src/%.src.$(1) src/upper src/selector-$(1) src/lower
+#$(1): $(if $(wildcard src/selector-$(1)),$(call SRC2HTML, $(wildcard ../src/*.src.$(1)) $(wildcard ../essays/src/*.src.$(1)),-$(1)))
+$(1): $(if $(wildcard src/selector-$(1)),$(call SRC2HTML, $(foreach dir,$(SRCDIRS),$(wildcard ../$(dir)/*.src.$(1))),-$(1)))
+endef
+
+define lang-dir-def
+$(call SRC2HTML, $(wildcard ../$(2)/*.src.$(1)),-$(1)): %-$(1).html : ../$(2)/%.src.$(1) src/upper src/selector-$(1) src/lower
 	$(if $($(1)_ENCODING),\
 	sed -e '/text\/html/s/iso-8859-1/$($(1)_ENCODING)/' src/upper | \
 	cat - src/selector-$(1) $$< src/lower > $$@,\
 	cat src/upper src/selector-$(1) $$< src/lower > $$@)
 endef
 endif
+
 $(foreach lang, $(TRANSLATIONS),$(eval $(call lang-def,$(lang))))
+$(foreach lang, $(TRANSLATIONS), $(foreach dir,$(SRCDIRS),$(eval $(call lang-dir-def,$(lang),$(dir)))))
+$(foreach dir, $(SRCDIRS),$(eval $(call en-dir-def,$(dir))))
 
 ifneq ($(INTERNAL),yes)
 
@@ -48,4 +51,3 @@
 	make -C $@ -f $(if $(filter-out Makefile,$(MAKEFILE_LIST)), $(MAKEFILE_LIST), ../Makefile) INTERNAL=yes
 
 endif
-
-------------- 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/20050514/4fdd63c0/attachment.pgp>


More information about the MPlayer-DOCS mailing list