Better way to do conditional inclusion in make
Warner Losh
imp at bsdimp.com
Fri Feb 6 03:20:11 UTC 2015
> On Feb 5, 2015, at 6:06 PM, NGie Cooper <yaneurabeya at gmail.com> wrote:
>
> On Thu, Feb 5, 2015 at 4:41 PM, Julian Elischer <julian at freebsd.org> wrote:
>
> ...
>
>> how does it cope with the case where a single file is dependent on either of
>> two options.
>> (we have this in our tree.. not sure if it occurs in the FreeBSD tree.)
>> file could occur in both lists or twice in one list..
>
> This is a good, valid point. I think that Warner's proposal will fix
> the simple case (using one knob), but not the more complex case.
This isn’t that valid a point. It’s a trivial annoyance. When this construct
can’t cope (like for things that deal with arch dependent stuff), you fall
back to old-school ifs.
> What concerns me about the short description of the implementation,
> (and something that I'm going to add to the phabricator review) is
> that this will:
>
> 1. Break using FILESGROUPS
How?
> 2. Requires creating snippets for dealing with magic in bsd.*.mk (I
> wouldn't want this magic going into the general purpose snippets
> because it would probably break backwards compatibility).
Explain.
Warner
More information about the freebsd-arch
mailing list