Subject: Re: A way to get more consistency with *USE_* variables
To: Quentin Garnier <cube@NetBSD.org>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 05/02/2004 10:23:53
--XBg9NAhDNArbJUtw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, May 02, 2004 at 01:26:36AM +0200, Quentin Garnier wrote:

> +# Globalized variables
> +GLOBAL_FEATURES=	OPENLDAP
> +
> +# Default value is 'NO' for not-yet-defined variables, but it can be
> +# overriden on a package-by-package basis
> +.for _feat_ in ${GLOBAL_FEATURES}
> +USE_${_feat_}?=	NO
> +.  if defined(USE_${_feat_}.${PKGBASE}) && \
> +       !empty(USE_${_feat_}.${PKGBASE}:M[Yy][Ee][Ss])
> +USE_${_feat_}=	${USE_${_feat_}.${PKGBASE}}
> +.  endif
> +.endfor

perhaps a more obvious way to define an overridable default for each
feature would be to do something like:

USE_<FEATURE>.pkgbase=	no
USE_<FEATURE>.*=	yes

this concept is definitely a step in the right direction. :)

I had diffs which did this but I don't know where I put them...

grant.


--XBg9NAhDNArbJUtw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAlD+ZluYOb9yiFXoRAtKOAJ441S3aJPzHlwtyaMFSQc04QzbidwCfbUP8
mEiNaMV6P9XhMzJs8wpySJw=
=uTYg
-----END PGP SIGNATURE-----

--XBg9NAhDNArbJUtw--