[Cook] looking at ways to exclude files from compilation
Henderson, Michael D
michael.d.henderson at lmco.com
Wed Dec 29 09:45:01 EST 2010
I have a project that includes files from a vendor that are used to build a library. I put those files into a directory called "vendlib". I have been using a manifest to find the .c files in that directory and compile them into the library.
That's been working well but now I need to break it. We're now receiving files from the vendor that have names like "scan_16.c" and "scan_32.c" and "scan_64.c". I don't want to compile the *_32.c files but want the *_16 and *_64.c files.
I can hardwire the bit in the cook file that builds the manifest to ignore those files. I tried something like:
manifest = [filter_out %0%_32.c
[stripdot
[collect find . -type f -name '*.c' print]]];
It works but I'm trying to keep that part of the cook file generic since it's included in many projects. I would like something like
if [filterFile] then
manifest = [filter_out [filterFile]
[stripdot
[collect find . -type f -name '*.c' print]]];
else
manifest = [stripdot
[collect find . -type f -name '*.c' print]];
So, now that that's working, I'm wondering "so what to do when I need to filter out *_32.c and *_16.c"? I don't see a way to pass two patterns to filter on without going through a loop
manifest [stripdot [collect find . -type f -name '*.c' print]];
loop local aFilter = [filterFile] {
manifest = [filter_out [aFile] [manifest]];
}
Is there a better way to handle that?
Thanks,
Michael D Henderson
no problem is too big if you don't have to solve all of it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20101228/45bde590/attachment.html>
More information about the Cook-users
mailing list