help-make
[Top][All Lists]
Advanced

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

Re: function call arguments


From: Semen Trygubenko
Subject: Re: function call arguments
Date: Wed, 27 Apr 2011 12:30:21 +0100

2011/4/27 ali hagigat <address@hidden>:
> I tested the following:
> all: ;
> var1=$(subst this,that,this is  a,      text)
> $(warning $(var1))
> makefile28:3: that is  a,      text
> make: `all' is up to date.

Ah ... $(subst ) is a built-in function that accepts "text" as its
third argument so "this is a,    text" is parsed as a single argument.
Try this ;) :

all: ;
mysubst=$(subst $1,$2,$3)
var1=$(call mysubst,this,that,this is  a,      text)
$(warning $(var1))

HTH,


-- 
Семен



reply via email to

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