[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatically generate rules from a list variable
From: |
Sam Ravnborg |
Subject: |
Re: Automatically generate rules from a list variable |
Date: |
Fri, 24 Oct 2008 18:41:18 +0200 |
User-agent: |
Mutt/1.4.2.1i |
On Fri, Oct 24, 2008 at 07:13:36PM +0300, Andrei Deftu wrote:
> On Fri, Oct 24, 2008 at 6:51 PM, Paul Smith <address@hidden> wrote:
> > Why can't youjust use a normal pattern rule? Something like:
> >
> > %.cpp_o : %.cpp
> > # bla bla
> >
> > ?
>
> Thanks but this rule matches every .cpp_o files and I want it to match
> only the files from LIST.
> e.g.:
>
> LIST1 := file1.cpp file2.cpp file3.cpp
> LIST2 := file4.cpp file5.cpp file6.cpp
>
> and I want the files from LIST1 to be built using one rule and the
> ones from LIST2 using other rule. Then, your solution does not work.
So something like this:
$(LIST1): %.cpp_o: %.cpp
# bla bla
$(LIST2): %.cpp_o: %.cpp
# blaa blaa
Here you use your pattern rule but limited to the files
listed in the variables.
Sam
Re: Automatically generate rules from a list variable, Boris Godin, 2008/10/24