Subject: Re: how to conditionally set variable?
To: None <tech-pkg@netbsd.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: tech-pkg
Date: 02/13/2006 19:05:00
Roland Illig --> INBOX.Lists.NetBSD.tech-pkg (2006-02-13 18:41:19 +0100):
> 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

Thanks!


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~