Variant build specific node vs in-dir build

55 views
Skip to first unread message

Gerardo Delgadillo

unread,
Dec 20, 2019, 10:43:39 AM12/20/19
to tup-users
We have debug and release builds, and our source tree include many projects. Our developers usually focus on a set of projects (sometimes only building debug versions) and never compile the others. Meaning, if using in-dir builds, they could build the desired flavor with "tup myproject/debug64" or "tup myproject/release64" for example.

For variants, I could not figure out how to build a specific node. How do I tell tup to build a specific node for that variant? Like, tup variant-name myproject.

Now, for in-dir builds, I came up with a little trick to avoid repetition. I have a common file that does the work, and it sits a level above my build directories. The Tupfiles in these build directories include this common file after setting the config type (that the common file uses to chose the right compiler and link flags, etc). It works, but I wonder if there's a different, easier technique I can use? This is how the directory structure looks like:
    common_file
    debug/Tupfile
    release/Tupfile

And the "debug" Tupfile has these lines:
    include_rules
    Config = debug
    include ../common_file

Gerardo Delgadillo

unread,
Jan 3, 2020, 3:24:47 PM1/3/20
to tup-users
I answered my own question -- use the variant path, along with wherever the project's Tupfile is in the source tree. Duh, yeah?
Reply all
Reply to author
Forward
0 new messages