Re: using depends properly
Bill Deegan <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CFqMnWfsdV3h751jqZahYOz0ZnkmASk0iF_Lx60i-=ChQ@mail.gmail.com> |
On Sat, Oct 5, 2019 at 1:29 PM daggs <[email protected]> wrote: > Greetings, > > something I don't get, you've stated I can use env1.Foo('$O/%s'%d), prev) > but the %d is outside of the quotes and the brackets are unbalaced > I typed the code free hand assuming the consumer would fix any trivial issue.. I'm trying to understand the logic behind this example. > You do not have to create a file to pass it into a builder. > > I'm using abspath as a habit to be as much as accurate as possible, if it > doesn't matter much I'll drop it. > abspath is almost never needed. > my main goal is to depend creation of specific files in order to control > the build flow. > as stated in my previous mail, I was able to do so by using the actual > targets and not the scons files. > That's an abstract description of what you're trying to do, I was asking for a specific example. -Bill *Sent:* Friday, October 04, 2019 at 6:40 PM *From:* "Bill Deegan" <[email protected]> *To:* "SCons users mailing list" <[email protected]> *Subject:* Re: [Scons-users] using depends properly 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 <[email protected]> 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" <[email protected]> > *To:* [email protected] > *Cc:* "SCons users mailing list" <[email protected]> > *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" <[email protected]> > *To:* "SCons users mailing list" <[email protected]> > *Subject:* Re: [Scons-users] using depends properly > look at scons --tree=all > > On Tue, Oct 1, 2019 at 12:03 PM daggs <[email protected]> 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" <[email protected]> >> *To:* "SCons users mailing list" <[email protected]> >> *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 <[email protected]> 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 >>> [email protected] >>> https://pairlist4.pair.net/mailman/listinfo/scons-users >> >> _______________________________________________ Scons-users mailing list >> [email protected] >> https://pairlist4.pair.net/mailman/listinfo/scons-users >> _______________________________________________ >> Scons-users mailing list >> [email protected] >> https://pairlist4.pair.net/mailman/listinfo/scons-users > > _______________________________________________ Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ > Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ > Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users