[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bashism in _header_without_use?
From: |
Jim Meyering |
Subject: |
Re: bashism in _header_without_use? |
Date: |
Thu, 20 Aug 2009 11:05:08 +0200 |
Simon Josefsson wrote:
> Running 'make syntax-check' when /bin/sh is bash works fine, but not
> when /bin/sh is dash. Reproduce by 'git clone
> git://git.savannah.gnu.org/gnutls.git && cd gnutls && make
> syntax-check'. Any ideas? I worked around the problem and don't have
> time to look into a proper fix now, but thought I should mention the
> issue in case someone else wants to look into it.
Thanks!
There were actually two problems!
This fixes both:
>From 84efe726c214319385caaade0414f737ab9a05f4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
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 RHS
of sed expression that converts "." to "\." in the resulting regexp.
Start with a dummy statement, so that prior shell variable definitions
are expanded portably.
---
ChangeLog | 8 ++++++++
top/maint.mk | 3 ++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index aae0ae0..30d12a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-08-20 Jim Meyering <address@hidden>
+
+ maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
+ * top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the RHS
+ of sed expression that converts "." to "\." in the resulting regexp.
+ Start with a dummy statement, so that prior shell variable definitions
+ are expanded portably.
+
2009-08-20 Paolo Bonzini <address@hidden>
Fix polling for writeability of a screen buffer.
diff --git a/top/maint.mk b/top/maint.mk
index 4108177..21782e5 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$$')) && \
--
1.6.4.378.g88f2f