Subject: pkg/24476: empty() requires a defined variable in 1.6.x make(1)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tv@duh.org>
List: netbsd-bugs
Date: 02/18/2004 10:50:54
>Number:         24476
>Category:       pkg
>Synopsis:       empty() requires a defined variable in 1.6.x make(1)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 18 15:52:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Todd Vierling
>Release:        NetBSD 1.6.x
>Organization:
	DUH.ORG:  Pointing out the obvious since 1994.
>Environment:
>Description:

So I've been away for a week and update my pkgsrc.  Two places popped up
in the interim where empty() is called on undefined variables, which
breaks on NetBSD 1.6.x make(1).  So pkgsrc is currently unusable on 1.6.

>How-To-Repeat:

Try to build pretty much anything in pkgsrc on 1.6.x.  Try to run pkg_chk
on X11 packages.  Get errors from the empty(PREPEND_PATH:...) conditional
in mk/tools.mk and empty(BUILDLINK_IS_BUILTIN....) conditional in
pkgtools/x11-links/xfree.mk.

>Fix:

Change these conditionals so that either:

* the variable is checked by defined() earlier in the conditional before
  the empty()

* the variable is predefined to empty using a ?= before the empty() check

(Note:  Telling 1.6.x users to upgrade is not acceptable.  pkgsrc
officially supports the most recent released branch of NetBSD -- and until
recently, the most recent *two* release branches of NetBSD.)
>Release-Note:
>Audit-Trail:
>Unformatted: