From c30797ae77cb344a7fccf96820632194acdd18fe Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 27 Feb 2008 06:14:23 +0000 Subject: Define BUILTIN_LIBNAME.* outside of the CHECK_BUILTIN.*-protected section to be the name of the built-in library if USE_BUILTIN.* is "yes". These variables can be used in other builtin.mk files. --- mk/curses.builtin.mk | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mk/curses.builtin.mk') diff --git a/mk/curses.builtin.mk b/mk/curses.builtin.mk index e35b4ee4da3..e1e812ebc2a 100644 --- a/mk/curses.builtin.mk +++ b/mk/curses.builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: curses.builtin.mk,v 1.3 2008/02/27 04:47:02 jlam Exp $ +# $NetBSD: curses.builtin.mk,v 1.4 2008/02/27 06:14:23 jlam Exp $ BUILTIN_PKG:= curses @@ -46,6 +46,15 @@ USE_BUILTIN.curses!= \ .endif MAKEVARS+= USE_BUILTIN.curses +# Define BUILTIN_LIBNAME.curses to be the built-in curses library only if +# we're using the built-in curses. +# +.if !empty(USE_BUILTIN.curses:M[yY][eE][sS]) +. if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) +BUILTIN_LIBNAME.curses= curses +. endif +.endif + ### ### The section below only applies if we are not including this file ### solely to determine whether a built-in implementation exists. @@ -57,10 +66,6 @@ CHECK_BUILTIN.curses?= no . if exists(${H_CURSES}) BUILDLINK_INCDIRS.curses?= ${H_CURSES:H:S/^${BUILDLINK_PREFIX.curses}\///} . endif -. if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) -BUILDLINK_LIBNAME.curses= curses -BUILDLINK_LDADD.curses?= -l${BUILDLINK_LIBNAME.curses} -. endif . endif .endif # CHECK_BUILTIN.curses -- cgit v1.2.3