Subject: more builtin.mk questions
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 05/22/2004 10:58:12
I set PREFER.ncurses=pkgsrc but mk/buildlink3/bsd.builtin.mk has:

.for _pkg_ in ${BUILDLINK_PACKAGES}
PREFER.${_pkg_}?=       pkgsrc
.  if !empty(PREFER_NATIVE:M[yY][eE][sS])
PREFER.${_pkg_}=        native
.  endif

So it is immediately reset to native.

Should all of the following:
.for _pkg_ in ${BUILDLINK_PACKAGES}
PREFER.${_pkg_}?=       pkgsrc
.  if !empty(PREFER_NATIVE:M[yY][eE][sS])
PREFER.${_pkg_}=        native
.  endif
.  if !empty(PREFER_PKGSRC:M[yY][eE][sS])
PREFER.${_pkg_}=        pkgsrc
.  endif
.  if !empty(PREFER_NATIVE:M${_pkg_})
PREFER.${_pkg_}=        native
.  endif
.  if !empty(PREFER_PKGSRC:M${_pkg_})
PREFER.${_pkg_}=        pkgsrc
.  endif
.endfor

use ?= instead?

I think they should because PREFER.${_pkg_} would only be defined if
someone really wanted it.

I will test this for awhile ...

 Jeremy C. Reed

 	  	 	 open source, Unix, *BSD, Linux training
	  	 	 http://www.pugetsoundtechnology.com/