From c60f2172b5be1b892ee24b622efecf4ae8819074 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 20 Jun 2008 11:04:38 +0200 Subject: * maint.mk: sync from coreutils --- maint.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/maint.mk b/maint.mk index 436363d..0a82a99 100644 --- a/maint.mk +++ b/maint.mk @@ -469,7 +469,7 @@ sc_immutable_NEWS: # Each program that uses proper_name_utf8 must link with # one of the ICONV libraries. sc_proper_name_utf8_requires_ICONV: - progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\ + @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\ if test "x$$progs" != x; then \ fail=0; \ for p in $$progs; do \ @@ -483,9 +483,17 @@ sc_proper_name_utf8_requires_ICONV: exit 1; } || :; \ fi +# Warn about "c0nst struct Foo const foo[]", +# but not about "char const *const foo" or "#define const const". +sc_redundant_const: + @grep -E '\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \ + $$($(VC_LIST_EXCEPT)) && \ + { echo 1>&2 '$(ME): redundant "const" in declarations'; \ + exit 1; } || : + sc_const_long_option: @grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \ - | grep -v 'const struct option const' && { \ + | grep -Ev 'const struct option|struct option const' && { \ echo 1>&2 '$(ME): add "const" to the above declarations'; \ exit 1; } || : -- cgit v1.2.3