qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.0] Makefile: remove bashism


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH for-2.0] Makefile: remove bashism
Date: Mon, 07 Apr 2014 17:30:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 5 April 2014 15:25, Michael Tokarev <address@hidden> 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 <address@hidden>
>>
>> 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 <address@hidden>
>
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]