deplinenoise/tundra — pull request #179 by dreamtea (2013-05-19 17:10:45+00:00)
Title: Build-scoped environment tables

Hi,

I've been using tundra 2 for a couple of days (it's great by the way, thanks!) and this was an idea I had based on my initial experience. There seemed no place to define globally-shared configuration that could be used for both the IDE project generation modules and for build configuration. For example, the MSVC module puts my projects under OBJECTROOT by default, but there's nowhere for me to change the OBJECTROOT that's visible to the IDE modules.

There's IdeGenerationHints that can be used in this specific case, but in general it seemed like it would be nice to configure these modules through the environment, where you can use interpolation to build paths, etc.

It's just an idea. Below is the spiel from the commit log. If you want to integrate something like this, let me know and I can update the docs. If not, it was a fun learning experience :)

Thomas

---

Add support for "Env" and "ReplaceEnv" tables in the data passed to
Build(). The tables have exactly the same form as those inside a Config
table. Unfiltered variables defined here are added to the default
environment and are thus available globally, even to the IDE project
generation modules. Variables with a "Config" filter are added to the
dictionary of any configuration matching the filter (they are not added to
the global environment).

The motivation for this change is that there is currently nowhere to
define variables like OBJECTROOT, which a user might like to share between
IDE generation and build configuration, such that they are visible to
both. It also makes it possible to take advantage of the environment's
interpolation syntax in building paths to configure the IDE project
generation modules.

The new tables can also also provide a slightly less verbose alternative to
inheriting a table of common variables in every configuration, for
defining shared configuration variables.