[Scons-users] Default() and Ignore() - seem a little awkward

Gary Oberbrunner garyo at oberbrunner.com
Fri Jan 4 20:29:39 EST 2019


I think it's good practice to only ever call Default () once, in the top
level Sconstruct or Sconscript. Everything else just adds to the alias set
up there. Default(None) is definitely asking for trouble. :-)

--Gary

On Fri, Jan 4, 2019, 8:13 PM Mats Wichmann <mats at wichmann.us wrote:

> On 1/4/19 4:54 PM, Bill Deegan wrote:
> > Not really.
> > All the nodes are added.
> > Ignore says, don't build this one to satisfy this other one.
> > Default says, always build this even it it's not under the invocation
> > directory.
>
> I must be an idiot, because this is completely non-intuitive to me. In
> the absence of instructions to the contrary, default means build
> everything (which may not be a great idea). If you use Default, it means
> build that stuff. "always build this even it it's not under the
> invocation directory" means what?
>
> > What do you mean that an empty SConscript isn't benign?
>
> If you say nothing, all targets from a given environment are built.  I
> did note that I get that sconscript = construction env = targets is not
> a relationship enshrined in SCons canon, but I'm sure many people do
> assume that. So if in an SConscript, you undefine targets for a certain
> env - by way of using Default(None) - the build will not complete
> because there are no targets. Even if there are other targets in the
> overall build that are available to build. That was the idea behind
> claiming not benign.
>
> > On Fri, Jan 4, 2019 at 6:12 PM Mats Wichmann <mats at wichmann.us> wrote:
> >
> >> On 1/4/19 3:55 PM, Bill Deegan wrote:
> >>> Could what you want to do be better achieved by not adding the examples
> >> in
> >>> your relevant SConscript if such target(s) aren't asked for?
> >>
> >> In theory. That's kind of what the use of Default implies - don't add
> >> them if they're not asked for, no?
> _______________________________________________
> 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/20190104/553d0c8e/attachment-0001.html>


More information about the Scons-users mailing list