Subject: Re: *_OPTIONS for package options
To: Johnny C. Lam <jlam@NetBSD.org>
From: Juan RP <email@example.com>
Date: 07/27/2004 02:00:24
Content-Type: text/plain; charset=US-ASCII
On Sat, 24 Jul 2004 09:02:50 +0000
"Johnny C. Lam" <jlam@NetBSD.org> wrote:
> I don't see how we can implement this without touching the package
> Makefile. The package Makefile must contain the logic for actually
> using the selected build options, e.g.
> .if !empty(PKG_OPTIONS:MPAM)
> . include "../../security/PAM/buildlink3.mk"
> CONFIGURE_ARGS+= --with-pam
> So we clearly can't remove those sections of the package Makefiles.
> As for the rest, all that a package Makefile really needs to do is
> to put the following two lines somewhere before the option logic:
> PKG_SUPPORTED_OPTIONS= foo bar
> .include "../../mk/bsd.options.mk"
> The header of the example ("Global and legacy options") shown in
> bsd.options.mk is there solely to provide backwards-compatibility for
> using the old options, until we can deprecate and remove all instances
> of them.
> I think this is about as succinct as I can make it for the package
> developer to use.
> Or perhaps I'm not understanding the idea you're putting forth. Could
> you explain that to me again, with an example showing how your idea
> would work in practice?
My suggestion was only to add the buildlink files into another file, not into
the package Makefile, but this is wrong, because we'll have to add
CONFIGURE_ARGS to enable the feature, etc.
Just ignore my comments, bsd.options.mk looks really cool.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
-----END PGP SIGNATURE-----