Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

+ Define BUILTIN_LIBNAME.* unconditionally so that their values can

  always be used in other builtin.mk files.

+ In the USE_BUILTIN.* == "yes" case, set BUILDLINK_LIBNAME.* to the
  corresponding BUILTIN_LIBNAME.* value so that BUILDLINK_LIBNAME.*
  can always be used in other buildlink3.mk files.
  • Loading branch information...
commit 696aca3359727daeed03110d993fe0f3b451ae81 1 parent dc4ab7b
jlam authored
View
19 devel/ncurses/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.18 2008/02/27 06:14:23 jlam Exp $
+# $NetBSD: builtin.mk,v 1.19 2008/02/27 15:26:34 jlam Exp $
BUILTIN_PKG:= ncurses
@@ -100,23 +100,21 @@ USE_BUILTIN.ncurses= no
. endif
.endif
-# Define BUILTIN_LIBNAME.ncurses to be the built-in ncurses library
-# only if we're using the built-in ncurses.
+# Define BUILTIN_LIBNAME.ncurses to be the base name of the built-in
+# ncurses library.
#
-.if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
-. if !empty(BUILTIN_LIB_FOUND.ncurses:M[nN][oO]) && \
- !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
+.if !empty(BUILTIN_LIB_FOUND.ncurses:M[nN][oO]) && \
+ !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
BUILTIN_LIBNAME.ncurses= curses
-. endif
+.endif
#
# On Interix, there is a libncurses.a and a libcurses.so but strangely,
# no libncurses.so. We want to link against the shared library, so
# turn "-lncurses" into "-lcurses".
#
-. if (${OPSYS} == "Interix") && \
- !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
+.if (${OPSYS} == "Interix") && \
+ !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
BUILTIN_LIBNAME.ncurses= curses
-. endif
.endif
###
@@ -128,6 +126,7 @@ CHECK_BUILTIN.ncurses?= no
BUILDLINK_TRANSFORM+= l:ncurses:${BUILDLINK_LIBNAME.ncurses}
. if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
+BUILDLINK_LIBNAME.ncurses= ${BUILTIN_LIBNAME.ncurses}
BUILDLINK_TARGETS+= buildlink-curses-ncurses-h
BUILDLINK_TARGETS+= buildlink-ncurses-extra-includes
. endif
View
3  mk/curses.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: curses.buildlink3.mk,v 1.9 2008/02/27 06:15:04 jlam Exp $
+# $NetBSD: curses.buildlink3.mk,v 1.10 2008/02/27 15:26:34 jlam Exp $
#
# This Makefile fragment is meant to be included by packages that require
# any curses implementation instead of one particular one. The available
@@ -87,7 +87,6 @@ PKG_FAIL_REASON= \
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ncurses}
BUILDLINK_PACKAGES+= curses
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}curses
-BUILDLINK_LIBNAME.curses?= ${BUILTIN_LIBNAME.curses}
BUILDLINK_LDADD.curses?= ${BUILDLINK_LIBNAME.curses:S/^/-l/}
BUILDLINK_BUILTIN_MK.curses= ../../mk/curses.builtin.mk
.elif ${CURSES_TYPE} == "ncurses"
View
11 mk/curses.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: curses.builtin.mk,v 1.4 2008/02/27 06:14:23 jlam Exp $
+# $NetBSD: curses.builtin.mk,v 1.5 2008/02/27 15:26:34 jlam Exp $
BUILTIN_PKG:= curses
@@ -46,13 +46,11 @@ 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.
+# Define BUILTIN_LIBNAME.curses to be the base name of the built-in
+# curses library.
#
-.if !empty(USE_BUILTIN.curses:M[yY][eE][sS])
-. if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
+.if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
BUILTIN_LIBNAME.curses= curses
-. endif
.endif
###
@@ -66,6 +64,7 @@ CHECK_BUILTIN.curses?= no
. if exists(${H_CURSES})
BUILDLINK_INCDIRS.curses?= ${H_CURSES:H:S/^${BUILDLINK_PREFIX.curses}\///}
. endif
+BUILDLINK_LIBNAME.curses= ${BUILTIN_LIBNAME.curses}
. endif
.endif # CHECK_BUILTIN.curses
View
25 mk/termlib.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: termlib.builtin.mk,v 1.1 2008/02/27 04:47:02 jlam Exp $
+# $NetBSD: termlib.builtin.mk,v 1.2 2008/02/27 15:26:34 jlam Exp $
BUILTIN_PKG:= termlib
@@ -32,13 +32,24 @@ USE_BUILTIN.termlib= ${IS_BUILTIN.termlib}
.endif
MAKEVARS+= USE_BUILTIN.termlib
-# Define BUILTIN_LIBNAME.termlib to be the built-in terminal library
-# only if we're using the built-in termlib.
+# Define BUILTIN_LIBNAME.termlib to be the base name of the built-in
+# terminal library.
#
-.if !empty(USE_BUILTIN.termlib:M[yY][eE][sS])
-. if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS])
+.if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS])
BUILTIN_LIBNAME.termlib= termcap
-. elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
+.elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
BUILTIN_LIBNAME.termlib= curses
-. endif
.endif
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+CHECK_BUILTIN.termlib?= no
+.if !empty(CHECK_BUILTIN.termlib:M[nN][oO])
+
+. if !empty(USE_BUILTIN.termlib:M[yY][eE][sS])
+BUILDLINK_LIBNAME.termlib= ${BUILTIN_LIBNAME.termlib}
+. endif
+
+.endif # CHECK_BUILTIN.termlib
Please sign in to comment.
Something went wrong with that request. Please try again.