summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/readline.buildlink3.mk18
-rw-r--r--mk/readline.builtin.mk6
2 files changed, 14 insertions, 10 deletions
diff --git a/mk/readline.buildlink3.mk b/mk/readline.buildlink3.mk
index 584722c14f8..a687f80c2bc 100644
--- a/mk/readline.buildlink3.mk
+++ b/mk/readline.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: readline.buildlink3.mk,v 1.1 2013/07/15 01:54:25 ryoon Exp $
+# $NetBSD: readline.buildlink3.mk,v 1.2 2013/07/18 14:59:04 ryoon Exp $
#
# This Makefile fragment is meant to be included by packages that require
# any readline implementation instead of one particular one. The available
@@ -41,14 +41,16 @@ CHECK_BUILTIN.editlinereadline:= no
# Set the value of READLINE_DEFAULT depending on the platform and what's
# available in the base system.
#
-READLINE_DEFAULT?= editline
-
-_READLINE_ACCEPTED= # empty
-.if defined(USE_BUILTIN.editlinereadline) && \
- !empty(USE_BUILTIN.editlinereadline:M[yY][eE][sS])
-_READLINE_ACCEPTED+= editline # system editline exists or pkgsrc editline
+.if defined(IS_BUILTIN.editline) && \
+ !empty(IS_BUILTIN.editline:M[Yy][Ee][Ss])
+READLINE_DEFAULT= editline
+.else if defined(IS_BUILTIN.readline) && \
+ !empty(IS_BUILTIN.readline:M[Yy][Ee][Ss])
+READLINE_DEFAULT= readline
.endif
-_READLINE_ACCEPTED+= readline # pkgsrc readline
+
+
+_READLINE_ACCEPTED= ${_READLINE_PKGS} # both are provided by pkgsrc.
_READLINE_TYPE= ${READLINE_DEFAULT}
. if !empty(_READLINE_ACCEPTED:M${_READLINE_TYPE})
diff --git a/mk/readline.builtin.mk b/mk/readline.builtin.mk
index e9093aae90e..226eb80e70f 100644
--- a/mk/readline.builtin.mk
+++ b/mk/readline.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: readline.builtin.mk,v 1.1 2013/07/15 01:54:25 ryoon Exp $
+# $NetBSD: readline.builtin.mk,v 1.2 2013/07/18 14:59:04 ryoon Exp $
#
BUILTIN_PKG:= editlinereadline
@@ -15,14 +15,16 @@ BUILTIN_FIND_GREP.H_READLINE= \#define[ ]*RL_VERSION_MAJOR
.include "../../mk/buildlink3/bsd.builtin.mk"
.if !defined(IS_BUILTIN.editlinereadline)
-IS_BUILTIN.readline= no
+IS_BUILTIN.editlinereadline= no
. if empty(H_READLINE:M__nonexistent__) && \
empty(H_READLINE:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.readline:M[yY][eE][sS])
+IS_BUILTIN.readline= yes
IS_BUILTIN.editlinereadline= yes
. else if empty(_BLTN_H_READLINE:M__nonexistent__) && \
!empty(BUILTIN_LIB_FOUND.readline:M[nN][oO]) && \
!empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS])
+IS_BUILTIN.editline= yes
IS_BUILTIN.editlinereadline= yes
. endif
.endif