maint.mk: tighten "test a == b" check
authorJim Meyering <meyering@redhat.com>
Sat, 13 Nov 2010 09:43:08 +0000 (10:43 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 13 Nov 2010 09:43:08 +0000 (10:43 +0100)
* top/maint.mk (sc_prohibit_test_double_equal): Restrict this
test to files that contain something like #!/bin/sh.
Without this, coreutils would get two false positives in
the comments of C source files.

ChangeLog
top/maint.mk

index f085a3d..0c4a9fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-13  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: tighten "test a == b" check
+       * top/maint.mk (sc_prohibit_test_double_equal): Restrict this
+       test to files that contain something like #!/bin/sh.
+       Without this, coreutils would get two false positives in
+       the comments of C source files.
+
 2010-11-12  Eric Blake  <eblake@redhat.com>
 
        bootstrap: fix typo in previous attempt
 2010-11-12  Eric Blake  <eblake@redhat.com>
 
        bootstrap: fix typo in previous attempt
index d51944b..65c2f80 100644 (file)
@@ -820,6 +820,7 @@ sc_prohibit_test_minus_ao:
 # Avoid a test bashism.
 sc_prohibit_test_double_equal:
        @prohibit='(\<test| \[+) .+ == '                                \
 # Avoid a test bashism.
 sc_prohibit_test_double_equal:
        @prohibit='(\<test| \[+) .+ == '                                \
+       containing='^#! */bin/sh'                                       \
        halt='use "test x = x", not "test x =''= x"'                    \
          $(_sc_search_regexp)
 
        halt='use "test x = x", not "test x =''= x"'                    \
          $(_sc_search_regexp)