[Scons-users] Code generation and VariantDir?

Jason Fritz jasonfritzpublic at gmail.com
Mon Apr 28 17:24:49 EDT 2014


Hi Dirk,

Thanks so much for your time/attention on this!

The setup you sent me has one serious difference from my setup: the
auto-generated foo.h gets copied to the variant directory. In my setup,
the .h is generated within the same dir as the .tsn. The reason I'm doing
it this way is for legacy reasons: I'm converting an old recursive
Makefile-based build system into SCons, and there are hundreds of
directories that are importing the header files from existing source dirs.
I suppose I could re-work the build system to put the generated source
under the variant dirs if necessary, but would prefer not to.

Is there an easy way to get the .h file into the same dir but have the .o
files go into the variant dirs?

Thanks!!
Jason




On Mon, Apr 28, 2014 at 3:02 PM, Dirk Bächle <tshortik at gmx.de> wrote:


> On 28.04.2014 22:00, Jason Fritz wrote:

>

> [...]

> Anyway, by removing the Clone() calls, I got rid of the first warning: "scons:

> warning: Two different environments were specified for target

> src/autogen/foo.h"

>

> However, I'm still getting the second error/warning: "scons: ***

> Multiple ways to build the same target were specified for:

> src/autogen/foo.h (from ['src/autogen/foo.tsn'] and from ['

> src/autogen/foo.tsn'])". It lists the same .tsn file twice. It also

> says the error is coming from the SConscript line that calls my custom

> Builder: "fileList = codegenEnv.TsncCpp(tsnFile)"

>

> Any idea how to get rid of this second error?

>

>

> Please find a very basic, but working, setup attached. Does this help?

>

> Dirk

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140428/d5a30219/attachment.html


More information about the Scons-users mailing list