[Top][All Lists]

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

Re: macros in macro substitution

From: Aleksandar Uzelac
Subject: Re: macros in macro substitution
Date: Sat, 18 Nov 2006 00:00:26 +0100


  thanks alot for the answer, you were right, i read some nmake book on the 
subject instead. never heard of the patsubst function.


Friday, November 17, 2006, 9:01:09 PM, you wrote:

> On 11/17/06, Aleksandar Uzelac <address@hidden> wrote:

>>    this will work alright: OBJECTS=$(SOURCES:.c=.o)
>>    but i would need something like this:

> So, you want to replace
>    %.c
> with
>    $(TARGETPATH)/%.o

> right?  As described in the GNU make info pages (you _have_ read
> through them, right?), you can do that using the patsubst function:

>    OBJECTS = $(patsubst $(SOURCES),%.c,$(TARGETPATH)/%.o)

> That can also be written as:

> Philip Guenther

reply via email to

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