changeset 33546:6c7baec0132f

maintainer-makefile: prohibit test x == x * top/maint.mk (sc_prohibit_test_double_equal): New rule. Based on a report by Matthias Bolte. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Fri, 12 Nov 2010 14:10:32 -0700
parents 58d4055a6eee
children 038d27d3b504
files ChangeLog top/maint.mk
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 12 13:50:48 2010 -0700
+++ b/ChangeLog	Fri Nov 12 14:10:32 2010 -0700
@@ -1,5 +1,9 @@
 2010-11-12  Eric Blake  <eblake@redhat.com>
 
+	maintainer-makefile: prohibit test x == x
+	* top/maint.mk (sc_prohibit_test_double_equal): New rule.
+	Based on a report by Matthias Bolte.
+
 	bootstrap: allow FreeBSD gzip
 	* build-aux/bootstrap (get_version): Parse FreeBSD gzip version,
 	which has no '.' and goes to stderr.
--- a/top/maint.mk	Fri Nov 12 13:50:48 2010 -0700
+++ b/top/maint.mk	Fri Nov 12 14:10:32 2010 -0700
@@ -817,6 +817,12 @@
 	halt='$(_ptm1); $(_ptm2)'					\
 	  $(_sc_search_regexp)
 
+# Avoid a test bashism.
+sc_prohibit_test_double_equal:
+	@prohibit='(\<test| \[+) .+ == '				\
+	halt='use "test x = x", not "test x =''= x"'			\
+	  $(_sc_search_regexp)
+
 # Each program that uses proper_name_utf8 must link with one of the
 # ICONV libraries.  Otherwise, some ICONV library must appear in LDADD.
 # The perl -0777 invocation below extracts the possibly-multi-line