[Scons-users] Re-2: Code generation dependency problem

Roman Karlstetter Roman.Karlstetter at ifta.com
Thu Jan 15 03:33:38 EST 2015

Hi Dirk,

ok, I see. It's a little more complicated for me, though.

I split up Sconstruct and Sconscript like this intentionally. For our project, we have multiple platforms we want to build the program for, everything from the same sources (located in src, the source file for code generation are also located in a subfolder os src). 

Therefore, in my master Sconstruct file, I first call my code generation tool (it's the same for every platform).
Next, I "call" the correct Sconcript file which is located in a project-specific folder, e.g. X86, where the actual build is happening. 
The first step for the platform-specific sconscript file is to recursively "collect" the necessary *.cpp files by sconscript files (located in src) which have the form of the one I have in my original example. Collecting these source files is done here because the set of files is a little different for each platform.

So, my question is: is there a way to make this work with a source-file-collector sconscript file like in my original example? Or should I somehow change the way I collect the source files to something "better"?

Thanks and best regards,

Re: [Scons-users] Code generation dependency problem (14-Jan-2015 23:33)
From:   Dirk Bächle
To:SCons users mailing list

Hi Roman,

sorry for the late reply...if you're still interested in this problem find a working example attached please. I moved the 
'input.txt' to the 'src' folder, where all compilation is taking place now.
When working with variant dirs it's a good idea to start by getting things to work properly in the 'src' folder only. Make sure that 
you Builders are working on local filenames only, such that they can easily get prepended by the variant_dir if required. After 
that, all you need to do is include the 'src/SConscript' with the variant_dir(s) you need from the global SConstruct...and you're done.

Hope this helps you further.

Best regards,


On 22.12.2014 14:56, Roman Karlstetter wrote:
> Hi,
> sorry for the delay, but now I have a minimal example which illustrates my problem.
> It somehow has to do with the way that I collect my source files, but I don't see an obvious way how I could solve this.
> Find attached a sample project to reproduce the problem. Any ideas?
> Regards,
> Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150115/f722bc97/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Textpart.txt
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150115/f722bc97/attachment.txt>

More information about the Scons-users mailing list