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

Mats Wichmann mats at wichmann.us
Fri Jan 4 20:13:46 EST 2019


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?


More information about the Scons-users mailing list