[Scons-users] Disambiguating Entry in variant directory
tshortik at gmx.de
Thu Jan 29 16:47:44 EST 2015
On 29.01.2015 21:27, Ilya L wrote:
> I realize that I can fix this by preventing bogus Dir('#source/foo')
> from being created. I do not have a full understanding yet of what
> triggers its creation, though it must be related to the variant and
> repository directory setup the real build is using.
when you're using VariantDir directly, as you do in your example, you're supposed to reference all targets in the build directory.
When I change the SConstruct to:
the error is gone. Please also refer to the UserGuide, sect. "15.4. The VariantDir Function" for more info on this. However, I
really recommend you to use the "variant_dir" option, as described in sect. "15.1. Specifying a Variant Directory Tree as Part of an
SConscript Call" ...it will definitely make your life easier in the long run.
> But before diving
> too deeply into that, I was wondering how hard would it be to teach
> SCons to tolerate such call sequences? At a glance, a new branch in
> disambiguate(), that would check for an already existing source
> SCons.Node.FS.Dir, should do the trick.
The disambiguate() method already stat()s the Node's path to see whether it's a file or directory. If you want to defer this
decision to an already existing FS.Dir node, how do you decide the disambiguation step for this FS.Dir when the folder doesn't
exist? (the real problem doesn't go away...)
All together, I think you should try to amend your build following the references above. The behaviour of SCons doesn't look like a
bug to me for now.
More information about the Scons-users