On czwartek, 24 grudnia 2015 16:24:30 CET Mac Reichelt wrote:
> Thanks for the tip!
> 
> Is there a way for me to add a file to a group without executing a command?
> 
> In my case, I'm only using the Tupdefault.lua file to automatically
> traverse
> subdirectories; if a call to "tup.glob(*)" from "data/Tupfile.lua" returned
> files
> in subdirectories, that would solve my problem exactly. Since it doesn't,
> I'd like to have a rule that only added the files to the group without
> calling
> any kind of command.
> 
> Here's what I'm trying to accomplish in bash:
> #!/usr/bin/env bash
> for D in *; do [ -d "${D}" ] && zip -jr "${D}.zip" "${D}"; done
> 
> However, I'd like the files in groups so I may do additional processing
> based on extension.

I know that this is possible, because I saw it somewhere - either on the group 
or in the issues on github (or maybe in some test case?). But I just cannot 
find it now...

I think it was something like that:

tup.rule("some_file", "", TOP .. "/<some_group>")

So just input file, output group and empty command, but I cannot be sure /;

However I don't know whether this will allow you to do what you want - I don't 
think there's a way to expand group (list its contents) in lua but _NOT_ 
inside a rule. I needed something similar some time ago and the workaround I 
thought about was having a file in multiple groups - like <generated> with all 
files, <generated.h> for all generated .h files, <generated.o> for generated 
objects and so on (additionally I wanted <generated> for all files in this 
tree, "subfolder/<generated>" for all generated files in subfolder and so on), 
but - for now - multiple output groups are not supported too. Having both - a 
way to list contents of a group in lua and multiple output groups - would be 
really cool (;

Regards,
FCh

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