That is correct. You must keep the .o in the same directory as the Tupfile 
that generates it if you want to use that .o in another Tupfile. This is 
how I have always used it. For example, this works:

a/Tupfile:
: foreach *.cc |> g++ -c %f -o %o |> %B.o

b/Tupfile:
: foreach *.cc |> g++ -c %f -o %o |> %B.o
: *.o ../a/*.o |> g++ -o %o %f |> foo

I know this "pollutes" your source tree with object files, something which 
I don't like. I prefer to keep object files in a separate. To do that in my 
project, I use a tup feature called variants. I don't know if it is 
available on Windows, though. I find this feature indispensable.

In short, using a variant creates a completely separate "build" directory 
that mirrors your source hierarchy. All generated files go into the 
corresponding directory in the build area. For instance if I generate foo.o 
from a/b/Tupfile, the object gets compiled into build-debug/a/b/foo.o. Tup 
does some filesystem magic to make it appear that the objects are right 
next to the source files.

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