Thanks Erik. Didn't realize that it is possible to insert rules at runtime
using run.
I can use script to generate Tupfile explicitly listing each file.
On Thursday, February 15, 2018 at 7:52:05 PM UTC-5, Erik wrote:
>
> I can think of four possible ways to do this.
>
> 1. Name files you don't want to link differently, so you can do
> `foreach folder\link-*.c`. If you can't rename in that fashion, then this
> won't work.
> 2. Explicitly name files `foreach file1.c file2.c` alternatively use a
> bin that you have control over. Similar to 1, this may not be possible.
> 3. Use `run` to generate the list of files you want, i.e. `run bash -c
> 'foreach $(<<< folder\*.c grep -v "exclude regex")'`. It seems like you're
> using windows, so insert appropriate windows scripting.
> 4. Use the lua api. "tup.glob('folder\*.c')" will return a table that
> you can then filter in lua. You have almost the full power of lua here, so
> anything you want to do is possible, but it does move away from the simple
> tup syntax.
>
> Hope that helps!
>
> On Thu, Feb 15, 2018 at 7:33 PM satish krosuru <[email protected]
> <javascript:>> wrote:
>
>> Hello,
>>
>> Is there a way to exclude files from "foreach folder\*.c" in a Tupfile.
>> We frequently have files in our source tree which cannot be linked due to
>> missing definitions.
>>
>> With just three files, Tupfile, Tupdefault and Tuprules, i was able to
>> compile and link the whole source tree.
>> Unfortunately I couldn't figure out how to exclude the files that i do
>> not want to compile and link.
>>
>> Thanks,
>> Satish K
>>
>>
>>
>>
>> --
>> --
>> tup-users mailing list
>> email: [email protected] <javascript:>
>> unsubscribe: [email protected] <javascript:>
>> options: http://groups.google.com/group/tup-users?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "tup-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
--
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
---
You received this message because you are subscribed to the Google Groups
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.