Roland Illig <roland.illig%gmx.de@localhost> writes: > Am 11.08.2022 um 12:30 schrieb nia: >> On Thu, Aug 11, 2022 at 12:15:28PM +0530, Mayuresh wrote: >>> Just like we can set PKG_OPTIONS.pkgbase, can package specific values be >>> provided for other variables - say PKGSRC_COMPILER. >> >> .if !empty(PKGPATH:Mlang/perl5) > > Just out of interest: since PKGPATH is guaranteed to be defined in > mk.conf and since it contains a single word only, the above condition > can also be written as: > > .if ${PKGPATH} == lang/perl5 > > .if ${PKGPATH} == "lang/perl5" > > .if ${PKGPATH:Mlang/perl5} > > I wonder whether there is any benefit of the '!empty' over the above > alternatives, other than "we've always done it like that". I bet it's just "always done it". I personally find !empty of :M to be very confusing and I have to check every time. I guess it's ok for regexps, if that works. I mildly prefer the 2nd of your 3, but arguably the first is better on the don't-gratuitously-quote plan, and for me it's a very close second.
Attachment:
signature.asc
Description: PGP signature