maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
authorJim Meyering <meyering@redhat.com>
Thu, 20 Aug 2009 09:04:20 +0000 (11:04 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 20 Aug 2009 09:09:42 +0000 (11:09 +0200)
* top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
expression that converts "." in a file name to "\." in the resulting
regexp.  Start with a dummy statement, so that prior shell variable
definitions are expanded portably.  Reported by Simon Josefsson.

ChangeLog
top/maint.mk

index aae0ae0..700858d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-08-20  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
+       * top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
+       expression that converts "." in a file name to "\." in the resulting
+       regexp.  Start with a dummy statement, so that prior shell variable
+       definitions are expanded portably.  Reported by Simon Josefsson.
+
 2009-08-20  Paolo Bonzini  <bonzini@gnu.org>
 
        Fix polling for writeability of a screen buffer.
index 4108177..21782e5 100644 (file)
@@ -235,7 +235,8 @@ sc_prohibit_HAVE_MBRTOWC:
 # h: the header, enclosed in <> or ""
 # re: a regular expression that matches IFF something provided by $h is used.
 define _header_without_use
-  h_esc=`echo "$$h"|sed 's/\./\\./g'`;                                 \
+  dummy=; : so we do not need a semicolon before each use;             \
+  h_esc=`echo "$$h"|sed 's/\./\\\\./g'`;                               \
   if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then             \
     files=$$(grep -l '^# *include '"$$h_esc"                           \
             $$($(VC_LIST_EXCEPT) | grep '\.c$$')) &&                   \