[Cook] How to create a more generic recipie
Jerry Pendergraft
jerry at endocardial.com
Thu Jan 8 06:54:17 EST 2004
On Wed, 7 Jan 2004, Henderson, Michael D wrote:
> I think you just opened a door. The patterns are relative to the target.
>
> I'm new to this, so I would have cribbed from the tutorial and tried %
> before %1, like this
>
> bin/%: engine/main.o %/lib/libnew.a %/lib/libold.a
> {
> [c++] [c++_flags] -L%/lib/ -o [target] engine/main.o -lnew -lold;
> }
>
> Is there a preference between using '%1' and just '%'?
Not really. Obviously you need the %N form if you need more than 1 ;^)
I tend to use the %N form out of habit and the fact that I daily deal with
many recipes that have multiple patterns because we build stuff for
multiple architectures and multiple compilers all at once - ala
%1/obj/%2/%3.o
%1/lib/%2/%3.a
%1/bin/%2/%3
where %1 is the architecture, %2 the compiler, and %3 the target basename.
>
> Thanks,
> Mike
>
--
Jerry Pendergraft jerry.pendergraft at endocardial.com
Endocardial Solutions voice: 651-523-6935
1350 Energy Lane, Suite 110 fax: 651-644-7897
St Paul, MN 55108-5254 mobile: 651-491-0163
More information about the Cook-users
mailing list