diff mbox series

[3/3] po/Makefile: Modern shell scripting (use $() instead of ``)

Message ID 20181017094406.4844-4-maozhongyi@cmss.chinamobile.com
State New
Headers show
Series Modern shell scripting (use $() instead of ``) | expand

Commit Message

Mao Zhongyi Oct. 17, 2018, 9:44 a.m. UTC
Various shell files contain a mix between obsolete ``
and modern $(); It would be nice to convert to using $()
everywhere.

Cc: philmd@redhat.com
Cc: peter.maydell@linaro.org
Cc: thuth@redhat.com
Cc: sw@weilnetz.de

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 po/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth Oct. 17, 2018, 9:54 a.m. UTC | #1
On 2018-10-17 11:44, Mao Zhongyi wrote:
> Various shell files contain a mix between obsolete ``
> and modern $(); It would be nice to convert to using $()
> everywhere.
> 
> Cc: philmd@redhat.com
> Cc: peter.maydell@linaro.org
> Cc: thuth@redhat.com
> Cc: sw@weilnetz.de
> 
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> ---
>  po/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/po/Makefile b/po/Makefile
> index e47e262ee6..10605e8eb3 100644
> --- a/po/Makefile
> +++ b/po/Makefile
> @@ -36,7 +36,7 @@ clean:
>  
>  install: $(OBJS)
>  	for obj in $(OBJS); do \
> -	    base=`basename $$obj .mo`; \
> +	    base=$(basename $$obj .mo); \

You're changing a Makefile here, so you need to "escape" the "$" by
doubling it:

	base=$$(basename $$obj .mo); \

 Thomas
Mao Zhongyi Oct. 18, 2018, 2:10 a.m. UTC | #2
On 10/17/18 5:54 PM, Thomas Huth wrote:
> On 2018-10-17 11:44, Mao Zhongyi wrote:
>> Various shell files contain a mix between obsolete ``
>> and modern $(); It would be nice to convert to using $()
>> everywhere.
>>
>> Cc: philmd@redhat.com
>> Cc: peter.maydell@linaro.org
>> Cc: thuth@redhat.com
>> Cc: sw@weilnetz.de
>>
>> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
>> ---
>>   po/Makefile | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/po/Makefile b/po/Makefile
>> index e47e262ee6..10605e8eb3 100644
>> --- a/po/Makefile
>> +++ b/po/Makefile
>> @@ -36,7 +36,7 @@ clean:
>>   
>>   install: $(OBJS)
>>   	for obj in $(OBJS); do \
>> -	    base=`basename $$obj .mo`; \
>> +	    base=$(basename $$obj .mo); \
> 
> You're changing a Makefile here, so you need to "escape" the "$" by
> doubling it:
> 
> 	base=$$(basename $$obj .mo); \

OK, I see your point.

Thanks,
Mao

> 
>   Thomas
>
diff mbox series

Patch

diff --git a/po/Makefile b/po/Makefile
index e47e262ee6..10605e8eb3 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -36,7 +36,7 @@  clean:
 
 install: $(OBJS)
 	for obj in $(OBJS); do \
-	    base=`basename $$obj .mo`; \
+	    base=$(basename $$obj .mo); \
 	    $(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES; \
 	    $(INSTALL) -m644 $$obj $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES/qemu.mo; \
 	done