[Cook] wildcard question

Ryan Thompson ryan at flamtap.org
Fri Feb 8 09:00:16 EST 2008


Thanks for the tip. I have been using the tutorial and user's guide quite a
bit.

When I try the recipe/ingredients below I get this error message:
cook: Howto.cook: 63: illegal use of '%0' in "%0%.cpp" pattern

Is there another way?

In the meantime I have gotten everything working putting objects in the
directories with the source, but I'm still curious if there is a way to do
this.

-Ryan


On Feb 7, 2008 4:42 PM, Aryeh M. Friedman <aryeh.friedman at gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Try the recipe name and ingrididents like this:
>
> obj/%.o: %0%.cpp
>
> now %0 is not hardwired to XXX/obj (i.e. it lets you put it almost
> anywhere)... also you need to modify [match_mask %.cpp [manifest]]; to
> be [fromto %.cpp obj/%.o [match_mask %.cpp [manifest]]];...
>
> Ryan Thompson wrote:
> | Hi,
> |
> | I am a new user of cook, trying to get a simple build set up. I have
> .cpp sources coming from various directories, but I would like to keep
> all my .o files in one place, in ./obj/
> |
> | At this point in my file I have variables set up like this
> |
> |
> | manifest = File1.cpp ../module/File2.cpp subdir/File3.cpp
> |
> | obj = obj/File1.o obj/File2.o obj/File3.o
> |
> | %0%.o:
> | {
> |        test1 = [match_mask %.cpp [manifest]];
> |        echo test1;
> | }
> |
> |
> | If I do 'cook obj/File1.o' the recipe works as expected. For the other
> two, match_mask doesn't match the .cpp file name with a path on the
> front of the file name.
> |
> | I would like to be able to do something with a wildcard inside the
> recipe, like:
> |       test1 = [match_mask *%.cpp [manifest]];
> |
> | Is this possible? Is there another approach I should try?
> |
> | I know I can just keep the obj files in SRCDIR/obj but I want to know
> if the above is possible. Thanks for any help,
> |
> | -Ryan Thompson
> |
> | -------------------------
> |
> | _______________________________________________
> | Cook-users mailing list
> | Cook-users at auug.org.au
> | http://www.auug.org.au/mailman/listinfo/cook-users
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.4 (FreeBSD)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHq3tNHYM+mNo6WpsRAiqpAKCO8WeryEwy9m0tB++hPQCB84Pn4gCg5RC7
> ZFJNffXh0iwr6jpB0KDFg+A=
> =HDTD
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20080207/c6b2b5c6/attachment.htm>


More information about the Cook-users mailing list