trans-coord-devel
[Top][All Lists]
Advanced

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

trans-coord/gnun/server/gnun ChangeLog GNUmakefile


From: Yavor Doganov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakefile
Date: Thu, 01 Jul 2010 12:35:27 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Yavor Doganov <yavor>   10/07/01 12:35:27

Modified files:
        gnun/server/gnun: ChangeLog GNUmakefile 

Log message:
        Bail out when bulding homepage/whatsnew if the lang is undefined.
        * GNUmakefile ($(template-dir)/po/whatsnew.%.html)
        ($(rootdir)/home.$(1).shtml): For robustness, check if the
        language is defined in TEMPLATE_LINGUAS and exit with an error if
        that's not the case.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.174&r2=1.175
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.74&r2=1.75

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -b -r1.174 -r1.175
--- ChangeLog   19 Feb 2010 15:23:55 -0000      1.174
+++ ChangeLog   1 Jul 2010 12:35:27 -0000       1.175
@@ -1,3 +1,11 @@
+2010-07-01  Yavor Doganov  <address@hidden>
+
+       Bail out when bulding homepage/whatsnew if the lang is undefined.
+       * GNUmakefile ($(template-dir)/po/whatsnew.%.html)
+       ($(rootdir)/home.$(1).shtml): For robustness, check if the
+       language is defined in TEMPLATE_LINGUAS and exit with an error if
+       that's not the case.
+
 2010-02-18  George Zarkadas  <address@hidden>  (tiny change)
             Yavor Doganov  <address@hidden>
 

Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- GNUmakefile 7 Jan 2010 14:43:04 -0000       1.74
+++ GNUmakefile 1 Jul 2010 12:35:27 -0000       1.75
@@ -373,6 +373,22 @@
                                    $(template-dir)/po/whatsnew.%.po \
                                    $(template-dir)/whatsnew.%.include \
                                    generic.%.html
+# Check if the language is defined TEMPLATE_LINGUAS.  Unfortunately,
+# we can't use make conditionals since automatic variables are only
+# within the scope of the recipe.
+ifndef NOTIFYSKIP
+       if [ -z $(findstring $*,$(TEMPLATE_LINGUAS)) ]; then \
+         echo 'The "$*" language code is not defined in TEMPLATE_LINGUAS.' \
+           | mail $(transl-addr) -s \
+           "[GNUN Error] Could not build $$(subst $$(rootdir)/,,$$@)"; \
+         exit 1; \
+       fi
+else
+       if [ -z $(findstring $*,$(TEMPLATE_LINGUAS)) ]; then \
+         echo 'The "$*" language code is not defined in TEMPLATE_LINGUAS.'; \
+         exit 1; \
+       fi
+endif
        PO=$(template-dir)/po/whatsnew.$*.po ; $(MAILFAIL) \
          $(NOTIFYSKIP) $(transl-addr) \
          "[GNUN Error] $${PO#../../} is not a valid PO file" \
@@ -435,6 +451,17 @@
 
 $(rootdir)/home.$(1).shtml: $(rootdir)/po/home.proto \
                            $(rootdir)/po/home.$(1).po generic.$(1).html
+# Check if the language is present in TEMPLATE_LINGUAS.
+ifeq (,$(findstring $(1),$(TEMPLATE_LINGUAS)))
+ifndef NOTIFYSKIP
+       echo 'The "$(1)" language code is not defined in TEMPLATE_LINGUAS.' \
+         | mail $(transl-addr) -s \
+         "[GNUN Error] Could not build $$(subst $$(rootdir)/,,$$@)"  
+else
+       @echo 'The "$(1)" language code is not defined in TEMPLATE_LINGUAS.'
+endif
+       exit 1
+endif
 # If $PO is not valid, then the generated page could be broken even
 # for the reader.  Ensure that the build still barfs next time if the
 # translator doesn't fix it quickly.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]