Linking objects from multiple directories should work. Use a rule like:
: *.o foo/*.o |> gcc %f -o %o |> prog
This will link all the objects in the current directory (*.o) and the
foo/ directory (foo/*.o) into 'prog'. You will of course need rules in
the current directory and in foo to compile those files before trying
to link them. Are you having specific issues with this?
Tup doesn't create directories or write files to different
directories. If you want to generate a file in a particular directory,
make the directory and put a Tupfile there. I haven't found a need to
write files to other directories yet.
-Mike
--
tup-users mailing list
email: tup-...@googlegroups.com
unsubscribe: tup-users+...@googlegroups.com
options: http://groups.google.com/group/tup-users?hl=en
I don't think tup will ever be able to handle having a Tupfile write
the output of a command into a different directory. For example, this
will probably never work:
: input |> command |> foo/output
but you can always do this in the foo/ directory:
: ../input |> command |> output
Though this is different from the concept of a completely separate
build directory, where a mirrored directory structure is setup for all
generated files. That may be possible, but it seems tricky to get the
paths right for generating the commands. Also the Tupfiles would need
knowledge of the separate build directory, since passing in a compiler
flag of "-I." may really need to be "-I. -I$(BUILD_DIR)" if a header
file is generated in a separate build directory.
Do you actually use Time Machine for your source code? I've never used
it myself so I don't know of its capabilities, but I would think an
actual version control system would be more useful in that you'd have
commit messages and branching and such. In other words, why not ignore
the whole development tree instead of just the build directory?
>
> I see what you mean by just putting a Tupfile in the directory and telling
> it to build the binaries in there, but I like the idea of having a central
> point of control without Tupfiles litterring the directories.
One man's litter is another's gold mine of info about what actually got built :)
-Mike
Do you actually use Time Machine for your source code? I've never used
it myself so I don't know of its capabilities, but I would think an
actual version control system would be more useful in that you'd have
commit messages and branching and such. In other words, why not ignore
the whole development tree instead of just the build directory?
One man's litter is another's gold mine of info about what actually got built :)
Nope, there is no concept of targets in tup. If you want it to handle
installing the end results of things into a final directory (like all
binaries in a bin/ directory), then you'll need to put a Tupfile there
that pulls everything in using 'cp' or something. Otherwise this is
probably better handled by the package manager for your system.
-Mike