From 1bf2866e9fe367d788f4979cb35d44ae9e734974 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 20 Aug 2009 11:04:20 +0200 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ top/maint.mk | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aae0ae098..700858d7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-08-20 Jim Meyering + + 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 Fix polling for writeability of a screen buffer. diff --git a/top/maint.mk b/top/maint.mk index 410817767..21782e516 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -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$$')) && \ -- 2.11.0