Re: running buildre once and sharing it's output with another variant dir
Bill Deegan <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CH6z_7j7Jvbb1W+t2BC1Db93x+XHLSgYp8zcoZHNcrUrw@mail.gmail.com> |
Glad to help! On Sat, Jul 23, 2022 at 10:04 AM daggs <[email protected]> wrote: > worked like a charm, thanks for the help. > > *Sent:* Wednesday, July 20, 2022 at 6:13 PM > *From:* "Bill Deegan" <[email protected]> > *To:* "daggs" <[email protected]> > *Cc:* "SCons users mailing list" <[email protected]> > *Subject:* Re: [Scons-users] running buildre once and sharing it's output > with another variant dir > You could do something like > > RUN_ONCE=False > Export('RUN_ONCE') > ... > # in SConscript > Import('RUN_ONCE') > if not RUN_ONCE: > RUN_ONCE= True > ... builders for these files > ... > or > RUN_ONCE = env.MyMagicBuilders(...) > > Then use RUN_ONCE as source for your other builder(s)? > > > > > On Tue, Jul 19, 2022 at 11:59 PM daggs <[email protected]> wrote: > >> I'm running the same SConscript for two different modes, release and >> debug. >> they both need a set of generated files which are the same for both modes >> I can generate them for both variants but this seems like extra work. >> so I want to place them in a generic common path and that the first one >> will generate them. >> maybe I can move the generation to the parent SConscript. >> all I need is to make sure that the module's dir will depends on it... >> am I making any sense? >> >> Dagg. >> >> *Sent:* Tuesday, July 19, 2022 at 7:32 PM >> *From:* "Bill Deegan" <[email protected]> >> *To:* "SCons users mailing list" <[email protected]> >> *Cc:* "daggs" <[email protected]> >> *Subject:* Re: [Scons-users] running buildre once and sharing it's >> output with another variant dir >> A small working example might be helpful. >> >> So are you wanting to use the same SConscript for the second variant dir? >> Or is this a different SConscript? >> >> >> On Tue, Jul 19, 2022 at 8:28 AM Mats Wichmann <[email protected]> wrote: >> >>> On 7/19/22 08:34, daggs wrote: >>> > Greetings, >>> > >>> > I have a module which I compile using variant dir. >>> > in the module's SConscript, I have a builder that is executed on a set >>> of files. I'd like to export that set of files do it can be used in the >>> second variant dir. >>> > >>> > will Export do the work? >>> >>> What Export does is it stores a variable with its value (i.e. key/value >>> pair) in a global (to the SCons process) dictionary so that other things >>> can grab it needed. >>> >>> Not sure from your description what it is you want to share - generated >>> files? Export isn't really a mechanism intended for file contents, but >>> as long as you don't blow up the dictionary it might work.... >>> >>> >>> _______________________________________________ >>> 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