pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/tools If PLATFORM_TOOL.<tool> is defined for a part...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f85417a6c72e
branches:  trunk
changeset: 493003:f85417a6c72e
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Apr 25 06:16:38 2005 +0000

description:
If PLATFORM_TOOL.<tool> is defined for a particular tool, then use it
instead of the pkgsrc version of the tool.  This is an alternative to
adding the appropriate platform to the _TOOLS_USE_PLATFORM.* tables.

diffstat:

 mk/tools/replace.mk |  25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diffs (56 lines):

diff -r a85adcb38439 -r f85417a6c72e mk/tools/replace.mk
--- a/mk/tools/replace.mk       Mon Apr 25 05:41:50 2005 +0000
+++ b/mk/tools/replace.mk       Mon Apr 25 06:16:38 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.13 2005/04/24 23:32:09 jlam Exp $
+# $NetBSD: replace.mk,v 1.14 2005/04/25 06:16:38 jlam Exp $
 #
 # This Makefile fragment handles "replacements" of system-supplied
 # tools with pkgsrc versions.  The replacements are placed under
@@ -116,15 +116,16 @@
 
 ######################################################################
 
-# _TOOLS_USE_PKGSRC.<prog> is "yes" or "no" depending on whether we're
-# using a pkgsrc-supplied tool to replace the system-supplied one.
-#
-# This currently uses ${OPSYS}-based checking and ignores the scenario
-# where your kernel and userland aren't in sync.  This should be turned
-# into a bunch of feature tests in the future.
+# _TOOLS_USE_PKGSRC.<tool> is "yes" or "no" depending on whether we're
+# using a pkgsrc-supplied tool to replace the system-supplied one.  We
+# use the system-supplied one if PLATFORM_TOOL.<tool> is non-empty, or
+# otherwise if this is a particular ${MACHINE_PLATFORM} listed above.
 #
 .for _t_ in ${_TOOLS_REPLACE_LIST}
 .  for _pattern_ in ${_TOOLS_USE_PLATFORM.${_t_}}
+.    if defined(PLATFORM_TOOL.${_t_}) && !empty(PLATFORM_TOOL.${_t_})
+_TOOLS_USE_PKGSRC.${_t_}?=     no
+.    endif
 .    if !empty(MACHINE_PLATFORM:M${_pattern_})
 _TOOLS_USE_PKGSRC.${_t_}?=     no
 .    endif
@@ -134,7 +135,7 @@
 .endfor
 .undef _t_
 
-# TOOLS_DEPENDS.<prog> defaults to BUILD_DEPENDS.
+# TOOLS_DEPENDS.<tool> defaults to BUILD_DEPENDS.
 .for _t_ in ${_TOOLS_REPLACE_LIST}
 TOOLS_DEPENDS.${_t_}?= BUILD_DEPENDS
 .endfor
@@ -391,7 +392,13 @@
 .for _t_ in ${_TOOLS_REPLACE_LIST}
 .  if !defined(TOOLS_IGNORE.${_t_}) && !empty(USE_TOOLS:M${_t_}) && \
       !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])
-.    if defined(${_TOOLS_VARNAME.${_t_}})
+.    if defined(PLATFORM_TOOL.${_t_}) && !empty(PLATFORM_TOOL.${_t_})
+TOOLS_REAL_CMD.${_t_}?=                \
+       ${PLATFORM_TOOL.${_t_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+TOOLS_ARGS.${_t_}?=            \
+       ${PLATFORM_TOOL.${_t_}:C/^/_asdf_/1:N_asdf_*}
+${_TOOLS_VARNAME.${_t_}}=      ${PLATFORM_TOOL.${_t_}}
+.    elif defined(${_TOOLS_VARNAME.${_t_}})
 TOOLS_REAL_CMD.${_t_}?=                \
        ${${_TOOLS_VARNAME.${_t_}}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
 TOOLS_ARGS.${_t_}?=            \



Home | Main Index | Thread Index | Old Index