diff top/maint.mk @ 11853:97a383c7cec4

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.
author Jim Meyering <meyering@redhat.com>
date Thu, 20 Aug 2009 11:04:20 +0200
parents 5dd8e8cf05db
children 2cd9af4a1b6a
line wrap: on
line diff
--- a/top/maint.mk	Tue Aug 04 18:06:07 2009 +0200
+++ b/top/maint.mk	Thu Aug 20 11:04:20 2009 +0200
@@ -235,7 +235,8 @@
 # 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$$')) &&			\