On 09/25/2014 04:53 PM, Iain Merrick wrote:
Same question! Is it now OK to output to a different directory? If so, are there any restrictions? Any gotchas to be aware of?

It works like a charm now (; I've been using this feature ever since it was available and reported some bugs, but all of them are fixed now. Moreover - with lua parser you can have output files in an identical tree as sources, but this whole tree can be in a subdirectory of the project! So if you have folders with sources:
a/*.c
a/a1/a2/*.c
b/*.c
c/*.c
d/*.c
d/d1/*.c
tup is able to compile all of the sources into relevant folders of this hierarchy:
output/a/*.o
output/a/a1/a2/*.o
output/b/*.o
output/c/*.o
output/d/*.o
output/d/d1/*.o
(the name "output" is just an example - it can be anything)

You can check this project of mine, which has tupfiles written in lua and they do exactly that:
https://github.com/DISTORTEC/distortos

In case of tupfiles written in "original tup parser" it's a bit harder and I guess such build as above wouldn't be possible (without manually stating outputs for each subfolder of the sources)... I usually just output all files into one subfolder, with no hierarchy (all of them go into this folder), so the only limitation is that I cannot have two object files with the same name (probably a bad idea anyway to have two source files with the same name). It would be probably easy to improve this hierarchy - you could easily output to a subfolder of this "output" folder, with the subfolder named as the last directory of the sources. Taking the above example, it would look like that:
output/a/*.o
output/a2/*.o
output/b/*.o
output/c/*.o
output/d/*.o
output/d1/*.o

Ask me anything about that, as I've excercised this ability of tup a lot (;

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