Subject: Re: Malformed conditional (!empty(MANINSTALL:Mcatinstall))
To: Simon J. Gerraty <>
From: Todd Vierling <>
List: tech-pkg
Date: 08/21/2003 15:03:39
On Thu, 21 Aug 2003, Simon J. Gerraty wrote:

: Note that if MANINSTALL is defined, its ok (same with -current make etc).
: That said, empty() shouldn't vomit if a variable is undefined - it should
: count as "empty".

Really?  When dealing with .if conditionals, given how many test for simple
definition instead of content, an undefined make variable is very different
from a defined but empty one.  I'll concede that it probably won't harm much
if empty() is true for undefined variables, but this problem also hits
comparison tests like '.if ${FOO} != "bar"'.

In NetBSD, this is normally handled by a construct that tests for
definition first, e.g. '.if defined(FOO) && !empty(FOO:...)'.

-- Todd Vierling <>