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

Mats Wichmann mats at wichmann.us
Sat Jan 5 09:30:48 EST 2019


On 1/4/19 9:52 PM, Bill Deegan wrote:

>> 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.
>>
> 
> You cannot undefine targets from an env. You can only not add them.
> If you're building a scheme which depends on undefining targets from the
> DAG.. you're doing it wrong...

okay, imprecise wording. the targets are still there (which I want), but
are not built by default. By "undefine target" I was trying to say
"remove from default build". However a default list of None is not
legal, apparently - which in an sconscript which currently defines
targets only for these "examples" and no other targets is a bit of a bummer.

> What mechanism do you use to enable them? Use that method to also add it to
> the tree, otherwise don't.

Not understanding this question. There are calls to env.Program builder,
so this is how things are "added".  Now I want those not to be built by
default, but be able to be built if explicitly requested. If we don't
have a Program call, then the latter is not possible - scons will know
no rule for building it, right?


More information about the Scons-users mailing list