[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#537306: d.o/international/Makefile: conditionnal subdirs never updated because $(LANGUAGE) Makefile targets never match



On Thu, Jul 16, 2009 at 11:24:59PM +0200, Simon Paillard wrote:
> A while ago, french team members noticed updates to
> webml/french/international/french were not taken into account on the
> website (and given the Makefile, it certainly affects spanish and
> dutch).
> 
> This is a request for help since I don't see where is the issue.
> 
> Here is the status (consider as a example french/{dwn_trans|web}.wml
> * from webml/french/international/french, the Makefile is correct and
>   the html file is rebuild as expected.
> 
> * from webml/french/international/, the Makefile seems correct but the
>   html file is not rebuild if needed.
> 
> However, if we look with care to english/international/Makefile:
> 
>  ifeq "$(LANGUAGE)" "fr"
>  SUBS += french
>  endif
> 
> * if I add a specific debug target :
> debug:
> ^I@echo $(SUBS)
> ^I@echo $(LANGUAGE)
> => I can see that SUBS doesn't contain french, while :
>  - $(LANGUAGE) contains fr
>  - ifeq syntax is correct
>  - SUBS syntax is correct (tested outside the ifeq)
> 
> Any idea ?

The problem is that LANGUAGE isn't set when the ifeqs are executed, so
they always fail and never append to SUBS.  Moving them after the
inclusion of Make.lang makes them append to SUBS, but SUBS will have
already been used to determine which subdirectories to recurse into.

The attached patch is the only way that I've found to correct the
problem.  It copies english/international/Makefile to
french/international/Makefile, includes "french" in SUBS initially,
and removes the ifeqs.  Likewise for Dutch and Spanish.

-- 
Matt Kraai                                           http://ftbfs.org/
Index: dutch/international/Makefile
===================================================================
RCS file: /cvsroot/webwml/webwml/dutch/international/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- dutch/international/Makefile	30 Oct 2002 14:03:14 -0000	1.8
+++ dutch/international/Makefile	17 Jul 2009 13:49:14 -0000
@@ -1 +1,11 @@
-include $(subst webwml/dutch,webwml/english,$(CURDIR))/Makefile
+# If this makefile is not generic enough to support a translation,
+# please contact debian-www.
+
+WMLBASE=..
+CUR_DIR=international
+SUBS=Catalan Chinese Croatian Danish dutch German l10n Polish Swedish
+
+include $(WMLBASE)/Make.lang
+
+
+index.$(LANGUAGE).html: index.wml $(ENGLISHSRCDIR)/international/index.data
Index: english/international/Makefile
===================================================================
RCS file: /cvsroot/webwml/webwml/english/international/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- english/international/Makefile	17 Aug 2008 13:53:58 -0000	1.24
+++ english/international/Makefile	17 Jul 2009 13:49:14 -0000
@@ -5,18 +5,6 @@
 CUR_DIR=international
 SUBS=Catalan Chinese Croatian Danish German l10n Polish Swedish
 
-ifeq "$(LANGUAGE)" "fr"
-SUBS += french
-endif
-
-ifeq "$(LANGUAGE)" "es"
-SUBS += spanish
-endif
-
-ifeq "$(LANGUAGE)" "nl"
-SUBS += dutch
-endif
-
 include $(WMLBASE)/Make.lang
 
 
Index: french/international/Makefile
===================================================================
RCS file: /cvsroot/webwml/webwml/french/international/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- french/international/Makefile	17 Aug 2008 13:52:06 -0000	1.18
+++ french/international/Makefile	17 Jul 2009 13:49:14 -0000
@@ -1 +1,11 @@
-include $(subst webwml/french,webwml/english,$(CURDIR))/Makefile
+# If this makefile is not generic enough to support a translation,
+# please contact debian-www.
+
+WMLBASE=..
+CUR_DIR=international
+SUBS=Catalan Chinese Croatian Danish french German l10n Polish Swedish
+
+include $(WMLBASE)/Make.lang
+
+
+index.$(LANGUAGE).html: index.wml $(ENGLISHSRCDIR)/international/index.data
Index: spanish/international/Makefile
===================================================================
RCS file: /cvsroot/webwml/webwml/spanish/international/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- spanish/international/Makefile	30 Oct 2002 14:03:27 -0000	1.11
+++ spanish/international/Makefile	17 Jul 2009 13:49:14 -0000
@@ -1 +1,11 @@
-include $(subst webwml/spanish,webwml/english,$(CURDIR))/Makefile
+# If this makefile is not generic enough to support a translation,
+# please contact debian-www.
+
+WMLBASE=..
+CUR_DIR=international
+SUBS=Catalan Chinese Croatian Danish German l10n Polish spanish Swedish
+
+include $(WMLBASE)/Make.lang
+
+
+index.$(LANGUAGE).html: index.wml $(ENGLISHSRCDIR)/international/index.data

Reply to: