[Scons-users] using depends properly

Bill Deegan bill at baddogconsulting.com
Fri Oct 4 11:40:36 EDT 2019


There is really no SConscript object, though  there is a File Node..

Honestly your simple example is pretty confusing.

Why not just explain what you are trying to do?

When I see things like this:
target = env1.Foo(File(env1.subst('$O') + '/' + d).abspath, prev)

I know there's a bunch you're still not getting.

target = env1.Foo('$O/%s'%d), prev)

Is sufficient. SCons will drop the abspath and not use it.

As far as I can tell you want to build a bunch of objects and build up a
list of those objects to use somewhere?

Do you want the target of this:
env2.Command('foo.out', '/dev/null', "echo this should be printed after all
the sleep and touch ends")

To depend on that list of objects?

-Bill




On Fri, Oct 4, 2019 at 7:22 AM daggs <daggs at gmx.com> wrote:

> to answer myself, I cannot depend on a sconscript object, only on a obje
> within the file.
>
> let see what I can do with my original project.
>
> Dagg.
>
> *Sent:* Thursday, October 03, 2019 at 3:13 PM
> *From:* "daggs" <daggs at gmx.com>
> *To:* scons-users at scons.org
> *Cc:* "SCons users mailing list" <scons-users at scons.org>
> *Subject:* Re: [Scons-users] using depends properly
> Greetings,
>
> here is the example: https://github.com/daggs1/test_scons_deps
>
> the reason I'm using an global list is because in the bigger project,
> there are 3 different lists which affects different scons files and the
> list that populates it (a,b,c,d) can be distribued to any of the lists.
> if the proper way is to return the list from the scons, then I'll try that
> (assuming there is no issue in returning three lists from a scons file)
>
> Thanks,
>
> Dagg.
>
> *Sent:* Tuesday, October 01, 2019 at 10:07 PM
> *From:* "Bill Deegan" <bill at baddogconsulting.com>
> *To:* "SCons users mailing list" <scons-users at scons.org>
> *Subject:* Re: [Scons-users] using depends properly
> look at scons --tree=all
>
> On Tue, Oct 1, 2019 at 12:03 PM daggs <daggs at gmx.com> wrote:
>
>> Greetings,
>>
>> scons_instance gets executed before any of the entries in the list are
>> executed. as it depends on them, it fails.
>> I'll try to devise a small project to reproduce it, will update when I
>> can.
>>
>> Thanks,
>>
>> Dagg.
>>
>> *Sent:* Tuesday, October 01, 2019 at 9:54 PM
>> *From:* "Bill Deegan" <bill at baddogconsulting.com>
>> *To:* "SCons users mailing list" <scons-users at scons.org>
>> *Subject:* Re: [Scons-users] using depends properly
>> You've failed to tell us what's happening.
>> Can you provide a small example so others can try to reproduce it?
>>
>> -Bill
>>
>> On Tue, Oct 1, 2019 at 10:56 AM daggs <daggs at gmx.com> wrote:
>>
>>> Greetings,
>>>
>>> I have a question on how to use the depends call properly.
>>> I have a folder with sconscript file in it which calls a builder on
>>> various inputs.
>>> for each input, I save the result of that builder in a appropriate list
>>> in a global var.
>>> after that, I call another sconsript file and declares this:
>>> env.Depends(scons_instance, list from global var)
>>> if I print that list, I see the targets I've saved.
>>> but I'd expect that all the builders will be executed first and only
>>> then scons_instance will get created.
>>> am I using the depends call wrong?
>>>
>>> how can I fix it?
>>>
>>> Thanks,
>>>
>>> Dagg.
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>> _______________________________________________ Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
> _______________________________________________ Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> _______________________________________________ Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> _______________________________________________
> 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/20191004/d8c2881c/attachment-0001.html>


More information about the Scons-users mailing list