maintainer-makefile: check for i18n setup
authorEric Blake <eblake@redhat.com>
Fri, 12 Nov 2010 00:20:02 +0000 (17:20 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 12 Nov 2010 15:40:15 +0000 (08:40 -0700)
* top/maint.mk (sc_bindtextdomain): Check for evidence that _()
will likely work.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
top/maint.mk

index 077649a92080a8582ccf4f2c340bff87cc75fae7..e348fe28a317e08a9f0314042546e39777f06ac9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-12  Eric Blake  <eblake@redhat.com>
+
+       maintainer-makefile: check for i18n setup
+       * top/maint.mk (sc_bindtextdomain): Check for evidence that _()
+       will likely work.
+
 2010-11-12  Bruno Haible  <bruno@clisp.org>
 
        sleep, nanosleep: Work around Linux 2.6.9 nanosleep bug.
index 55aeb7b69ba96a9f06c6afc3c0ddcfe36c25ddad..181a96fa45eaa8a30e27495d42a8e94fcbd18d2e 100644 (file)
@@ -590,10 +590,19 @@ sc_changelog:
 sc_program_name:
        @require='set_program_name *\(m?argv\[0\]\);'                   \
        in_vc_files='\.c$$'                                             \
-       containing='^main *('                                           \
+       containing='\<main *('                                          \
        halt='the above files do not call set_program_name'             \
          $(_sc_search_regexp)
 
+# Ensure that each .c file containing a "main" function also
+# calls bindtextdomain.
+sc_bindtextdomain:
+       @require='bindtextdomain *\('                                   \
+       in_vc_files='\.c$$'                                             \
+       containing='\<main *('                                          \
+       halt='the above files do not call bindtextdomain'               \
+         $(_sc_search_regexp)
+
 # Require that the final line of each test-lib.sh-using test be this one:
 # Exit $fail
 # Note: this test requires GNU grep's --label= option.