pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools Observe the following:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/875584f5b9aa
branches:  trunk
changeset: 493680:875584f5b9aa
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu May 12 03:57:40 2005 +0000

description:
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:

 mk/tools/defaults.mk |  7 +++++--
 mk/tools/replace.mk  |  7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 83937f4c828c -r 875584f5b9aa mk/tools/defaults.mk
--- a/mk/tools/defaults.mk      Thu May 12 01:14:05 2005 +0000
+++ b/mk/tools/defaults.mk      Thu May 12 03:57:40 2005 +0000
@@ -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 @@
 .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_
diff -r 83937f4c828c -r 875584f5b9aa mk/tools/replace.mk
--- a/mk/tools/replace.mk       Thu May 12 01:14:05 2005 +0000
+++ b/mk/tools/replace.mk       Thu May 12 03:57:40 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.68 2005/05/11 22:08:18 jlam Exp $
+# $NetBSD: replace.mk,v 1.69 2005/05/12 03:57:40 jlam Exp $
 #
 # This Makefile fragment handles "replacements" of system-supplied
 # tools with pkgsrc versions.
@@ -975,7 +975,10 @@
 .  endif
 .  if defined(_TOOLS_VARNAME.${_t_})
 .    if defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
-${_TOOLS_VARNAME.${_t_}}?=     ${TOOLS_${_TOOLS_VARNAME.${_t_}}}
+.      for _v_ in ${_TOOLS_VARNAME.${_t_}}
+${_v_}?=       ${TOOLS_${_TOOLS_VARNAME.${_t_}}}
+.      endfor
+.      undef _v_
 .    endif
 .  endif
 .endfor



Home | Main Index | Thread Index | Old Index