Subject: Re: *_OPTIONS for package options
To: Juan RP <firstname.lastname@example.org>
From: Johnny C. Lam <jlam@NetBSD.org>
Date: 07/24/2004 09:02:50
On Sat, Jul 24, 2004 at 10:03:46AM +0200, Juan RP wrote:
> Looks good, thanks for the work. But could we have only in the pkg Makefiles:
> PKG_SUPPORTED_OPTIONS+= foo bar
> And implement the logic automatically, without having to touch the pkg Makefile
> for this? I mean, if we add PKG_SUPPORTED_OPTIONS into the pkg Makefile, still
> we have to add the logic into the Makefile, right?
> I would like to make this automatically, for example as grant said before, e.g:
> # package # category #pkg-option
> openldap databases ldap
> cyrus-sasl2 security sasl2
> And the logic could be implemented into bsd.options.mk and not into the pkg
> What do you think about this?
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.
. include "../../security/PAM/buildlink3.mk"
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
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
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?
-- Johnny Lam <jlam@NetBSD.org>