summaryrefslogtreecommitdiff
path: root/top/maint.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-06-04 19:56:58 +0200
committerJim Meyering <meyering@redhat.com>2011-06-04 19:57:07 +0200
commit33b95ee0afed91f941fccd71252c8b2e72ae4544 (patch)
treeb95980ddc1d81ff2a2f276307f20b1b8fda06be5 /top/maint.mk
parent3d7fa330593948749e382e99a28a49ddf6878bde (diff)
downloadgnulib-33b95ee0afed91f941fccd71252c8b2e72ae4544.tar.gz
maint.mk: sc_unmarked_diagnostics: don't hard-code "error"
* top/maint.mk (sc_unmarked_diagnostics): Don't hard-code the function name, "error". (_gl_translatable_diag_func_re): New configurable variable.
Diffstat (limited to 'top/maint.mk')
-rw-r--r--top/maint.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/top/maint.mk b/top/maint.mk
index c55571cb47..6f6b8be391 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -684,11 +684,16 @@ sc_two_space_separator_in_usage:
halt='help2man requires at least two spaces between an option and its description'\
$(_sc_search_regexp)
+# A regexp matching function names like "error" that may be used
+# to emit translatable messages.
+_gl_translatable_diag_func_re ?= error
+
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
@grep -nE \
- '\<error *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
+ '\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+ $$($(VC_LIST_EXCEPT)) \
| grep -Ev '(_|ngettext ?)\(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :