Received: from eggs.gnu.org ([2001:4830:134:3::10]:54248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXBVq-0002Tu-Tg for qemu-devel@nongnu.org; Mon, 07 Apr 2014 11:31:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXBVm-00024k-HO for qemu-devel@nongnu.org; Mon, 07 Apr 2014 11:31:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXBVm-00024g-AL for qemu-devel@nongnu.org; Mon, 07 Apr 2014 11:31:02 -0400 From: Markus Armbruster References: <1396707946-21351-1-git-send-email-mjt@msgid.tls.msk.ru> Date: Mon, 07 Apr 2014 17:30:57 +0200 In-Reply-To: (Peter Maydell's message of "Mon, 7 Apr 2014 14:29:38 +0100") Message-ID: <8738hp9mxa.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH for-2.0] Makefile: remove bashism List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Fam Zheng , Paolo Bonzini , Michael Tokarev , QEMU Developers Peter Maydell writes: > On 5 April 2014 15:25, Michael Tokarev wrote: >> When installing modules (when --enable-modules is specified for >> ./configure), Makefile uses the following construct to replace all >> slashes with dashes in module name: >> >> ${s//\//-} >> >> This is a bash-specific substitution mechanism. POSIX does not >> have it, and some operating systems (for example Debian) does not >> implement this construct in default shell (for example dash). >> >> Use more traditional way to perform the substitution: use `tr' tool. >> >> >> Signed-off-By: Michael Tokarev >> >> diff --git a/Makefile b/Makefile >> index ec74039..d622799 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -376,7 +376,7 @@ endif >> ifneq ($(CONFIG_MODULES),) >> $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)" >> for s in $(patsubst %.mo,%$(DSOSUF),$(modules-m)); do \ >> - $(INSTALL_PROG) $(STRIP_OPT) $$s "$(DESTDIR)$(qemu_moddir)/$${s//\//-}"; \ >> + $(INSTALL_PROG) $(STRIP_OPT) $$s "$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \ >> done >> endif >> ifneq ($(HELPERS-y),) > > Reviewed-by: Peter Maydell > > Paolo, Fam: does this patch look ok to you? I propose > to apply it for 2.0... I don't understand the quoting in the old version offhand (leaning toothpick syndrome). The new version looks good to me.