Subject: Re: A way to get more consistency with *USE_* variables
To: grant beattie <grant@NetBSD.org>
From: None <cube@cubidou.net>
List: tech-pkg
Date: 05/02/2004 11:38:19
On Sun, May 02, 2004 at 10:23:53AM +1000, grant beattie wrote:
> 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. :)
Well, I didn't know make allowed stars in variable names. As good as
the example you give is, I find it rather confusing, generally
speaking.
Quentin Garnier.