[Scons-users] Handling implicit dependencies for generated source files in variant dirs

Dirk Bächle tshortik at gmx.de
Fri Oct 11 05:37:41 EDT 2013


On 10.10.2013 15:39, Henry Gomersall wrote:

> On 10/10/13 13:08, Dirk Bächle wrote:

>> [...]

>>

>> Can you try to do the env.Jinja() calls within the "src/SConscript"

>> too? You probably have to Export() your list of template files for

>> this...

> Ok, I've tried this.

>

> Two things become apparent:

> 1) the templates themselves are not copied - this leads to a problem

> in the way the tool handles the rendering. Essentially, there are a

> couple of dicts in the environment that contains the rendering

> specific variables (the "context"). One of these dicts itself contains

> a series of contexts that are specific to each template that is

> rendered. I currently look up this template specific context with a

> key which is the filename of the template. When it is called, the node

> thinks the path is the variant_dir, not the original source, so the

> lookup fails (it actually just renders nonsense as a consequence).

> 2) There are some static files in the src directory that are ignored

> (i.e. not copied) when building the variant dirs, but the compilation

> fails because it requires them.

>

> Are the two problems above the same problem? Why are the files not

> copied?

>


When the files are not copied it means that SCons doesn't see that they
are really needed. You can check the dependencies that SCons detected
with the command

scons --tree=derived target_name

where "target_name" can be any intermediate file that gets built (check
the MAN page for more --tree/--debug options). Please, poke around and
try to isolate the problem. Which files exactly aren't copied? In which
way do you try to add them to the dependency graph?

Regards,

Dirk



More information about the Scons-users mailing list