Subject: Re: how to conditionally set variable?
To: Jukka Salmi <j+nbsd@2006.salmi.ch>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 02/13/2006 18:41:19
Jukka Salmi wrote:
> Hi,
>
> I'd like to define ALLOW_VULNERABLE_PACKAGES when building
> lang/sun-jdk15 or lang/sun-jre15, and not to define it when building
> other packages. I added
>
> .if empty(PKGNAME:Nsun-jdk15-*:Nsun-jre15-*)
> ALLOW_VULNERABLE_PACKAGES= # defined
> .endif
I am using ${.CURDIR} for this purpose, which is automatically defined
by make(1). PKGNAME is only generally available after including
"bsd.pkg.mk", but mk.conf is always included before that file.
.if !empty(.CURDIR:M*/lang/sun-j[dr][ek]15-*)
ALLOW_VULNERABLE_PACKAGES= yes
.endif
Roland