help-make
[Top][All Lists]
Advanced

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

Re: expand % to set variable


From: Greg Chicares
Subject: Re: expand % to set variable
Date: Mon, 24 Jan 2011 18:10:11 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 2011-01-24 12:38Z, Klaus Rudolph wrote:
> 
> I want to set a variable from a part of a target specification.
> 
> %.x: CXXFLAGS+= %

Use '$*' instead of '%' on the right-hand side.

$cat pct.make
%.x: CXXFLAGS+= $*
%.x:
        @echo $(CXXFLAGS)
$make -f pct.make abc.x
abc



reply via email to

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