[Scons-users] scons not respecting variant_dir with object files

Bill Deegan bill at baddogconsulting.com
Mon Jun 6 08:56:37 EDT 2016


Dirk,

Shouldn't specifying VariantDir() explicitly also work?

-Bill

On Mon, Jun 6, 2016 at 3:14 AM, Dirk Bächle <tshortik at gmx.de> wrote:

> Hi,
>
> On 06.06.2016 01:30, Bill Deegan wrote:
>
>> The problem you are running into is the following:
>> 1) You've told SCons that dir/proj maps to build/out
>> 2) You've then asked SCons to build a file in dir/
>> 3) Since dir is not mapped to a variant dir, it builds the file there.
>>
>> This is not a bug with SCons.  It's an error in your expectations of how
>> VariantDir (or variant_dir) works.
>>
>> As Gary mentioned, if you merely want to have the output files explicitly
>> go somewhere, you can put that as the target in the builder.
>>
>> If you want to use VariantDir for this:
>>
>> Perhaps adding
>> VariantDir('build','proj', duplicate=0)
>> Would do the trick.
>>
>> I see you've also posted the same issue in Stackoverflow
>>
>> http://stackoverflow.com/questions/37645229/scons-not-respecting-variant-dir-with-object-files
>>
>> Please try explicitly using VariantDir() for the file you're referencing
>> and see if that resolves the issue.
>>
>>
> actually "No". Please first try rewriting your hierarchy of SConscripts,
> such that you can use the "variant_dir" option as described in chap 15
> "Separating Source and Build Directories" of the UserGuide (
> http://scons.org/doc/production/HTML/scons-user.html ). ;)
>
> Regards,
>
> Dirk
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160606/1689f95e/attachment.html>


More information about the Scons-users mailing list