On Friday, March 28, 2014 12:39:59 AM UTC+9, anonym anonym wrote:
>
> Hi
>
> I wanted to try tup out. But I have a issue that I couldn't find a 
> solution for.
>
> I have a line in my Tupfile like this:
>
> : foreach .*.cpp |> gcc %f -o %o |> %B.o
>
> The Problem is, that it's only valid for the directory where the Tupfile 
> is located. So it doesn't compile files in subdirectories. I really don't 
> want to copy my Tupfile into every subdirectory.
>
> Is there anything like this, that I can also search through subdirectories?
>
> : foreach **/*.cpp |> gcc %f -o %o |> %B.o
>
> Thanks for helping.
>

If you don't mind using the Lua parser instead 
(http://gittup.org/tup/lua_parser.html), I think there are two options:
1. Use a Tupdefault.lua file which is applied in directories with no 
Tupfile.lua, for the whole tree below the directory containing 
Tupdefault.lua
or 2. Write a recursive function or something and use tup.glob('*') to get 
lists of files.  I think I'd recommend #1 though, I'm not sure #2 will 
work... you'd have to have some pattern for distinguishing directories and 
there might be other problems (performance, etc).

-- 
-- 
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.

Reply via email to