[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: function call arguments
From: |
ali hagigat |
Subject: |
Re: function call arguments |
Date: |
Wed, 27 Apr 2011 16:03:17 +0430 |
If that is true, why the make manual says that comma character can not
be used inside the content of an argument?!!
2011/4/27 Semen Trygubenko <address@hidden>:
> 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,
>
>
> --
> Семен
>