Hi FCh,
Sorry, I delayed responding to this thread. Your input was very useful.

I managed to get it going, what I did finally was, I grouped each generated 
.C file into a Tup Group, and
I have a function that then takes the file name as argument, and writes the 
compilation command, and it uses the group name.

I'm attaching the Tupfile.lua that processes the IDL files to generate the 
header, and implementation classes,
and the file that then compiles the C file. 

If you have any comments on my Lua files, please let me know.

Regards,
venkrao

On Sunday, 27 July 2014 14:23:09 UTC+5:30, Freddie Chopin wrote:
>
> W dniu 2014-07-27 10:10, venkatakrishnarao ks pisze: 
> > As you can see, expanded command doesn't contain the file name. I'm 
> > forced to hardcode the output file name. 
> > or Am I using it incorrectly? 
>
> Well, what you're doing here is not a use case for %<group> - these are 
> meant to be used as an input to command that take MANY sources - like 
> linking. That's why %B doesn't work with that. To use them for ordering, 
> you use them as "extra_inputs" in lua (or order-only dependency in 
> tup-parser). Your example is too simple to show the real problem - if 
> you'd have multiple generators which would output their files NOT in 
> their own folder (for example - in the project's root), then this 
> couldn't be done easily without explicitly naming the input files for 
> next rules... I tried to experiment with that a bit, but I couldn't make 
> it work and not I have no more time... I'll try again later - in the 
> evening. 
>
> Another question is - does it make sense to have rules that just compile 
> unknown number of generated sources... You usually know that you 
> generate them, so it's possible to just list them... 
>
> Maybe it would work if all generators would output to some designated 
> subfolder (like PATH_ROOT .. "/generated")? 
>
> 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.

Attachment: extract_idl.lua
Description: Binary data

Attachment: compile_generated.lua
Description: Binary data

Reply via email to