automake
[Top][All Lists]
Advanced

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

Re: make portability issue


From: Ralf Wildenhues
Subject: Re: make portability issue
Date: Thu, 8 Feb 2007 12:52:39 +0100
User-agent: Mutt/1.5.13 (2007-02-07)

Hello Guillaume,

* Guillaume Rousse wrote on Thu, Feb 08, 2007 at 10:44:35AM CET:
> 
> I just found an issue in GNU make handling of empty variable in
> substitutions:
> A = foo
> LIST = $(A) $(B)
> LIST_H = $(LIST:=.h)
> 
> all:
>         echo $(LIST_H)
> 
> With GNU make 3.80, LIST_H is incorectly expanded to "foo.h .h", whereas
> in make 3.81, this is correctly expanded to "foo.h" only. How to
> workaround this ?

I think POSIX requires the part between `:' and `=' to be nonempty, but
not the part after `='.  So write

A = foo.h
LIST = $(A) $(B)
LIST_H = $(LIST:.h=)

Hope that helps.

Cheers,
Ralf




reply via email to

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