pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk + Define BUILTIN_LIBNAME.* unconditionally so that ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/883496c265c9
branches: trunk
changeset: 539095:883496c265c9
user: jlam <jlam%pkgsrc.org@localhost>
date: Wed Feb 27 15:26:34 2008 +0000
description:
+ 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:
devel/ncurses/builtin.mk | 19 +++++++++----------
mk/curses.buildlink3.mk | 3 +--
mk/curses.builtin.mk | 11 +++++------
mk/termlib.builtin.mk | 25 ++++++++++++++++++-------
4 files changed, 33 insertions(+), 25 deletions(-)
diffs (139 lines):
diff -r 11c275560916 -r 883496c265c9 devel/ncurses/builtin.mk
--- a/devel/ncurses/builtin.mk Wed Feb 27 14:22:10 2008 +0000
+++ b/devel/ncurses/builtin.mk Wed Feb 27 15:26:34 2008 +0000
@@ -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 @@
. 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 @@
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
diff -r 11c275560916 -r 883496c265c9 mk/curses.buildlink3.mk
--- a/mk/curses.buildlink3.mk Wed Feb 27 14:22:10 2008 +0000
+++ b/mk/curses.buildlink3.mk Wed Feb 27 15:26:34 2008 +0000
@@ -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 @@
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 -r 11c275560916 -r 883496c265c9 mk/curses.builtin.mk
--- a/mk/curses.builtin.mk Wed Feb 27 14:22:10 2008 +0000
+++ b/mk/curses.builtin.mk Wed Feb 27 15:26:34 2008 +0000
@@ -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 @@
.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 @@
. 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 -r 11c275560916 -r 883496c265c9 mk/termlib.builtin.mk
--- a/mk/termlib.builtin.mk Wed Feb 27 14:22:10 2008 +0000
+++ b/mk/termlib.builtin.mk Wed Feb 27 15:26:34 2008 +0000
@@ -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 @@
.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
+
+###
+### 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
+
+.endif # CHECK_BUILTIN.termlib
Home |
Main Index |
Thread Index |
Old Index