diff options
author | jlam <jlam@pkgsrc.org> | 2008-02-27 15:26:34 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2008-02-27 15:26:34 +0000 |
commit | 2b6ae3e7bc268041617b9a802546810cf22c58fe (patch) | |
tree | e7f6683c2de59045f2b7a5c73f989de2cc8dc921 /mk | |
parent | 9abef0a1b242bf894631213dc4c914eda9faa36d (diff) | |
download | pkgsrc-2b6ae3e7bc268041617b9a802546810cf22c58fe.tar.gz |
+ 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.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/curses.buildlink3.mk | 3 | ||||
-rw-r--r-- | mk/curses.builtin.mk | 11 | ||||
-rw-r--r-- | mk/termlib.builtin.mk | 25 |
3 files changed, 24 insertions, 15 deletions
diff --git a/mk/curses.buildlink3.mk b/mk/curses.buildlink3.mk index e66ef32235a..179262fc1d6 100644 --- a/mk/curses.buildlink3.mk +++ b/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" diff --git a/mk/curses.builtin.mk b/mk/curses.builtin.mk index e1e812ebc2a..df34f269451 100644 --- a/mk/curses.builtin.mk +++ b/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 diff --git a/mk/termlib.builtin.mk b/mk/termlib.builtin.mk index 5af985bd75d..b7386eb80b2 100644 --- a/mk/termlib.builtin.mk +++ b/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 |