summaryrefslogtreecommitdiff
path: root/mk/tools/defaults.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-12 03:57:40 +0000
committerjlam <jlam@pkgsrc.org>2005-05-12 03:57:40 +0000
commita136d7cc681dc220b402ea608322187f6ae274ea (patch)
treefd810989db352574285fd8529f94c6ebfc83c167 /mk/tools/defaults.mk
parent714ab3325dcfb228096bb4a6c327c76e619d9d45 (diff)
downloadpkgsrc-a136d7cc681dc220b402ea608322187f6ae274ea.tar.gz
Observe the following:
VAR= a PTR= VAR ${PTR}?= b Given these definitions, ${VAR} == "b" (unintuitively). We can work around this by doing: VAR= a PTR= VAR .for _v_ in ${PTR} ${_v_}?= b .endfor In this case, ${VAR} == "a" (as expected). Use the second form of assignment in this changeset so that the expected behavior happens for the "TOOL" name variables. This fixes "recursively defined" errors for some of the "TOOL" variables when the pkgsrc tool replaces the system-supplied one.
Diffstat (limited to 'mk/tools/defaults.mk')
-rw-r--r--mk/tools/defaults.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk
index 9a0e624b4ef..eee9c53d749 100644
--- a/mk/tools/defaults.mk
+++ b/mk/tools/defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.9 2005/05/10 19:52:30 jlam Exp $
+# $NetBSD: defaults.mk,v 1.10 2005/05/12 03:57:40 jlam Exp $
.if !defined(TOOLS_DEFAULTS_MK)
TOOLS_DEFAULTS_MK= defined
@@ -92,7 +92,10 @@ _TOOLS_VARNAME.yacc= YACC
.for _t_ in ${PKGSRC_USE_TOOLS:O:u}
. if defined(_TOOLS_VARNAME.${_t_}) && \
defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
-${_TOOLS_VARNAME.${_t_}}?= ${TOOLS_PLATFORM.${_t_}}
+. for _v_ in ${_TOOLS_VARNAME.${_t_}}
+${_v_}?= ${TOOLS_PLATFORM.${_t_}}
+. endfor
+. undef _v_
. endif
.endfor
.undef _t_