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

Dirk Bächle tshortik at gmx.de
Thu Oct 10 08:08:21 EDT 2013


On 10.10.2013 12:51, Henry Gomersall wrote:

> [...] Apologies, I wasn't quite clear enough. The h files are

> generated with their own explicit call to env.Jinja().

>

> That is, I do the same for the .h file:

> h_file = env.Jinja(os.path.join(source_dir, target_h_file),

> os.path.join(template_dir, target_source_name + '.h.jinja'))

>

> There is no side effect of creating the .h file, so I assumed that the

> dependency is inferred from that call...?

>


Yes, it is...and thanks for the clarifications. I can't find anything
fishy with your Tool itself, you did a good job on that one.

My current suspicion is that your problem has to do with:

c_file = env.Jinja(os.path.join('src', target_c_file), filenames)

versus

variant_nodes = build_env.SConscript('src/SConscript',
variant_dir=variant, exports='build_env', duplicate=0)

. I can't try it here because I don't have Jinja installed, but in the
first line you're not really putting the created Files under the
influence of the VariantDir mechanics. So, SCons doesn't copy those
files over to the "variant" dir, which makes the build fail for duplicate=1.

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

Regards,

Dirk



More information about the Scons-users mailing list