summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-04-28 03:01:11 +0000
committerjlam <jlam@pkgsrc.org>2005-04-28 03:01:11 +0000
commitab6ee6f23356b3efb8b70ca6dfe0f69f7891ea96 (patch)
treec6dcf6427b92bec2dbf7f999b008ac40a1f5a476
parent710781cc2f5f07ee92d49177d0a50dddd4da6f33 (diff)
downloadpkgsrc-ab6ee6f23356b3efb8b70ca6dfe0f69f7891ea96.tar.gz
Define TOOLS_DEPENDS.* to be the dependency that will be added, and
filter out dependencies that have already been added.
-rw-r--r--mk/tools/autoconf.mk16
-rw-r--r--mk/tools/automake.mk20
-rw-r--r--mk/tools/coreutils.mk7
-rw-r--r--mk/tools/perl.mk9
-rw-r--r--mk/tools/replace.mk53
5 files changed, 71 insertions, 34 deletions
diff --git a/mk/tools/autoconf.mk b/mk/tools/autoconf.mk
index 8c9f0ea4abb..6b31608466d 100644
--- a/mk/tools/autoconf.mk
+++ b/mk/tools/autoconf.mk
@@ -1,4 +1,4 @@
-# $NetBSD: autoconf.mk,v 1.3 2005/04/26 15:32:05 jlam Exp $
+# $NetBSD: autoconf.mk,v 1.4 2005/04/28 03:01:11 jlam Exp $
#
# This Makefile fragment handles packages that use GNU autoconf.
#
@@ -55,7 +55,12 @@ _TOOLS_AUTOCONF_LINKS= # empty
MAKEFLAGS+= TOOLS_IGNORE.autoconf=
. else
AUTOCONF_REQD?= 2.50
-BUILD_DEPENDS+= autoconf>=${AUTOCONF_REQD}:../../devel/autoconf
+
+TOOLS_DEPMETHOD.autoconf?= BUILD_DEPENDS
+TOOLS_DEPENDS.autoconf?= autoconf>=${AUTOCONF_REQD}:../../devel/autoconf
+. if empty(${TOOLS_DEPMETHOD.autoconf}:M${TOOLS_DEPENDS.autoconf})
+${TOOLS_DEPMETHOD.autoconf}+= ${TOOLS_DEPENDS.autoconf}
+. endif
_TOOLS_AUTOCONF_LINKS+= autoconf
TOOLS_REAL_CMD.autoconf= ${LOCALBASE}/bin/autoconf
@@ -92,7 +97,12 @@ AUTORECONF= ${TOOLS_CMD.autoreconf}
MAKEFLAGS+= TOOLS_IGNORE.autoconf213=
. else
AUTOCONF_REQD?= 2.13
-BUILD_DEPENDS+= autoconf213>=${AUTOCONF_REQD}:../../devel/autoconf213
+
+TOOLS_DEPMETHOD.autoconf213?= BUILD_DEPENDS
+TOOLS_DEPENDS.autoconf213?= autoconf213>=${AUTOCONF_REQD}:../../devel/autoconf213
+. if empty(${TOOLS_DEPMETHOD.autoconf213}:M${TOOLS_DEPENDS.autoconf213})
+${TOOLS_DEPMETHOD.autoconf213}+= ${TOOLS_DEPENDS.autoconf213}
+. endif
_TOOLS_AUTOCONF_LINKS+= autoconf
TOOLS_REAL_CMD.autoconf= ${LOCALBASE}/bin/autoconf-2.13
diff --git a/mk/tools/automake.mk b/mk/tools/automake.mk
index 2fee99c1959..50344f1d53e 100644
--- a/mk/tools/automake.mk
+++ b/mk/tools/automake.mk
@@ -1,4 +1,4 @@
-# $NetBSD: automake.mk,v 1.3 2005/04/26 15:32:05 jlam Exp $
+# $NetBSD: automake.mk,v 1.4 2005/04/28 03:01:11 jlam Exp $
#
# This Makefile fragment handles packages that use GNU automake.
#
@@ -72,9 +72,12 @@ _TOOLS_AUTOMAKE_LINKS= # empty
MAKEFLAGS+= TOOLS_IGNORE.automake=
. else
AUTOMAKE_REQD?= 1.9
-BUILD_DEPENDS+= automake>=${AUTOMAKE_REQD}:../../devel/automake
-USE_TOOLS+= autoconf
-AUTOCONF_REQD?= 2.58
+
+TOOLS_DEPMETHOD.automake?= BUILD_DEPENDS
+TOOLS_DEPENDS.automake?= automake>=${AUTOMAKE_REQD}:../../devel/automake
+. if empty(${TOOLS_DEPMETHOD.automake}:M${TOOLS_DEPENDS.automake})
+${TOOLS_DEPMETHOD.automake}+= ${TOOLS_DEPENDS.automake}
+. endif
_TOOLS_AUTOMAKE_LINKS+= aclocal
TOOLS_REAL_CMD.aclocal= ${LOCALBASE}/bin/aclocal
@@ -95,9 +98,12 @@ AUTOMAKE= ${TOOLS_CMD.automake}
MAKEFLAGS+= TOOLS_IGNORE.automake14=
. else
AUTOMAKE_REQD?= 1.4
-BUILD_DEPENDS+= automake14>=${AUTOMAKE_REQD}:../../devel/automake14
-USE_TOOLS+= autoconf213
-AUTOCONF_REQD?= 2.13
+
+TOOLS_DEPMETHOD.automake14?= BUILD_DEPENDS
+TOOLS_DEPENDS.automake14?= automake14>=${AUTOMAKE_REQD}:../../devel/automake14
+. if empty(${TOOLS_DEPMETHOD.automake14}:M${TOOLS_DEPENDS.automake14})
+${TOOLS_DEPMETHOD.automake14}+= ${TOOLS_DEPENDS.automake14}
+. endif
_TOOLS_AUTOMAKE_LINKS+= aclocal
TOOLS_REAL_CMD.aclocal= ${LOCALBASE}/bin/aclocal-1.4
diff --git a/mk/tools/coreutils.mk b/mk/tools/coreutils.mk
index 7117c4d311d..010a7cacfe8 100644
--- a/mk/tools/coreutils.mk
+++ b/mk/tools/coreutils.mk
@@ -1,4 +1,4 @@
-# $NetBSD: coreutils.mk,v 1.4 2005/04/28 02:10:56 jlam Exp $
+# $NetBSD: coreutils.mk,v 1.5 2005/04/28 03:01:11 jlam Exp $
#
# This Makefile fragment unconditionally replaces the system-supplied
# "core" utilities with the ones from the GNU coreutils package when
@@ -13,7 +13,10 @@
MAKEFLAGS+= TOOLS_IGNORE.coreutils=
. else
TOOLS_DEPMETHOD.coreutils?= BUILD_DEPENDS
-${TOOLS_DEPMETHOD.coreutils}+= coreutils>=5.2.1:../../sysutils/coreutils
+TOOLS_DEPENDS.coreutils?= coreutils>=5.2.1:../../sysutils/coreutils
+. if empty(${TOOLS_DEPMETHOD.coreutils}:M${TOOLS_DEPENDS.coreutils})
+${TOOLS_DEPMETHOD.coreutils}+= ${TOOLS_DEPENDS.coreutils}
+. endif
# List of core utilities for which we'll create symlinks under
# ${TOOLS_DIR}. This isn't every utility provided by coreutils, but
diff --git a/mk/tools/perl.mk b/mk/tools/perl.mk
index 3c905f89a63..84d177f292a 100644
--- a/mk/tools/perl.mk
+++ b/mk/tools/perl.mk
@@ -1,4 +1,4 @@
-# $NetBSD: perl.mk,v 1.2 2005/04/27 17:59:09 jlam Exp $
+# $NetBSD: perl.mk,v 1.3 2005/04/28 03:01:11 jlam Exp $
# Create a symlink from ${TOOLS_DIR}/bin/perl to ${PERL5} when USE_PERL5
# is defined. This ensures that when "perl" is invoked, the pkgsrc perl
@@ -9,10 +9,17 @@
MAKEFLAGS+= TOOLS_IGNORE.perl=
. else
. include "../../lang/perl5/buildlink3.mk"
+TOOLS_DEPMETHOD.perl?= BUILD_DEPENDS
+TOOLS_DEPENDS.perl?= ${BUILDLINK_DEPENDS.perl}:${BUILDLINK_PKGSRCDIR.perl}
TOOLS_SYMLINK+= perl
TOOLS_REAL_CMD.perl= ${PERL5}
. if exists(${TOOLS_REAL_CMD.perl})
PERL5= ${TOOLS_REAL_CMD.perl}
. endif
. endif
+. if defined(TOOLS_DEPMETHOD.perl) && defined(TOOLS_DEPENDS.perl)
+. if empty(${TOOLS_DEPMETHOD.perl}:M${TOOLS_DEPENDS.perl})
+${TOOLS_DEPMETHOD.perl}+= ${TOOLS_DEPENDS.perl}
+. endif
+. endif
.endif
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index 295d98150b7..13bf8f8ef6a 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.44 2005/04/28 02:10:56 jlam Exp $
+# $NetBSD: replace.mk,v 1.45 2005/04/28 03:01:11 jlam Exp $
#
# This Makefile fragment handles "replacements" of system-supplied
# tools with pkgsrc versions. The replacements are placed under
@@ -119,7 +119,7 @@ TOOLS_DEPMETHOD.${_t_}?= BUILD_DEPENDS
. if !empty(PKGPATH:Mlang/gawk)
MAKEFLAGS+= TOOLS_IGNORE.awk=
. elif !empty(_TOOLS_USE_PKGSRC.awk:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.awk}+= gawk>=3.1.1:../../lang/gawk
+TOOLS_DEPENDS.awk?= gawk>=3.1.1:../../lang/gawk
TOOLS_SYMLINK+= awk
TOOLS_REAL_CMD.awk= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}awk
. if exists(${TOOLS_REAL_CMD.awk})
@@ -132,7 +132,7 @@ ${_TOOLS_VARNAME.awk}= ${TOOLS_REAL_CMD.awk}
. if !empty(PKGPATH:Mdevel/bison)
MAKEFLAGS+= TOOLS_IGNORE.bison=
. elif !empty(_TOOLS_USE_PKGSRC.bison:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.bison}+= bison>=1.0:../../devel/bison
+TOOLS_DEPENDS.bison?= bison>=1.0:../../devel/bison
TOOLS_WRAP+= bison
TOOLS_REAL_CMD.bison= ${LOCALBASE}/bin/bison
TOOLS_ARGS.bison= -y
@@ -147,7 +147,7 @@ TOOLS_CMD.bison= ${TOOLS_DIR}/bin/yacc
. if !empty(PKGPATH:Mdevel/diffutils)
MAKEFLAGS+= TOOLS_IGNORE.cmp=
. elif !empty(_TOOLS_USE_PKGSRC.cmp:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.cmp}+= diffutils>=2.8.1:../../devel/diffutils
+TOOLS_DEPENDS.cmp?= diffutils>=2.8.1:../../devel/diffutils
TOOLS_SYMLINK+= cmp
TOOLS_REAL_CMD.cmp= ${LOCALBASE}/bin/cmp
. if exists(${TOOLS_REAL_CMD.cmp})
@@ -176,7 +176,7 @@ USE_TOOLS+= ${_t_}
. if !empty(_TOOLS_USE_PKGSRC.egrep:M[yY][eE][sS]) || \
!empty(_TOOLS_USE_PKGSRC.fgrep:M[yY][eE][sS]) || \
!empty(_TOOLS_USE_PKGSRC.grep:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.grep}+= grep>=2.5.1:../../textproc/grep
+TOOLS_DEPENDS.grep?= grep>=2.5.1:../../textproc/grep
. for _t_ in ${_TOOLS_GREPUTILS}
_TOOLS_USE_PKGSRC.${_t_}= yes
TOOLS_SYMLINK+= ${_t_}
@@ -193,7 +193,7 @@ ${_TOOLS_VARNAME.${_t_}}= ${TOOLS_REAL_CMD.${_t_}}
. if !empty(PKGPATH:Msysutils/file)
MAKEFLAGS+= TOOLS_IGNORE.file=
. elif !empty(_TOOLS_USE_PKGSRC.file:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.file}+= file>=4.13:../../sysutils/file
+TOOLS_DEPENDS.file?= file>=4.13:../../sysutils/file
TOOLS_SYMLINK+= file
TOOLS_REAL_CMD.file= ${LOCALBASE}/bin/file
. if exists(${TOOLS_REAL_CMD.file})
@@ -219,7 +219,7 @@ USE_TOOLS+= ${_t_}
. endfor
. if !empty(_TOOLS_USE_PKGSRC.find:M[yY][eE][sS]) || \
!empty(_TOOLS_USE_PKGSRC.xargs:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.find}+= findutils>=4.1:../../sysutils/findutils
+TOOLS_DEPENDS.find?= findutils>=4.1:../../sysutils/findutils
. for _t_ in ${_TOOLS_FINDUTILS}
_TOOLS_USE_PKGSRC.${_t_}= yes
TOOLS_SYMLINK+= ${_t_}
@@ -236,7 +236,7 @@ ${_TOOLS_VARNAME.${_t_}}= ${TOOLS_REAL_CMD.${_t_}}
. if !empty(PKGPATH:Mlang/gawk)
MAKEFLAGS+= TOOLS_IGNORE.gawk=
. elif !empty(_TOOLS_USE_PKGSRC.gawk:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.gawk}+= gawk>=3.1.1:../../lang/gawk
+TOOLS_DEPENDS.gawk?= gawk>=3.1.1:../../lang/gawk
TOOLS_SYMLINK+= gawk
TOOLS_REAL_CMD.gawk= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}awk
. if exists(${TOOLS_REAL_CMD.gawk})
@@ -250,7 +250,7 @@ TOOLS_CMD.gawk= ${TOOLS_DIR}/bin/awk
. if !empty(PKGPATH:Mdevel/m4)
MAKEFLAGS+= TOOLS_IGNORE.gm4=
. elif !empty(_TOOLS_USE_PKGSRC.gm4:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.gm4}+= m4>=1.4:../../devel/m4
+TOOLS_DEPENDS.gm4?= m4>=1.4:../../devel/m4
TOOLS_SYMLINK+= gm4
TOOLS_REAL_CMD.gm4= ${LOCALBASE}/bin/gm4
. if exists(${TOOLS_REAL_CMD.gm4})
@@ -264,7 +264,7 @@ TOOLS_CMD.gm4= ${TOOLS_DIR}/bin/m4
. if !empty(PKGPATH:Mdevel/gmake)
MAKEFLAGS+= TOOLS_IGNORE.gmake=
. elif !empty(_TOOLS_USE_PKGSRC.gmake:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.gmake}+= gmake>=3.78:../../devel/gmake
+TOOLS_DEPENDS.gmake?= gmake>=3.78:../../devel/gmake
TOOLS_SYMLINK+= gmake
TOOLS_REAL_CMD.gmake= ${LOCALBASE}/bin/gmake
. if exists(${TOOLS_REAL_CMD.gmake})
@@ -277,7 +277,7 @@ ${_TOOLS_VARNAME.gmake}= ${TOOLS_REAL_CMD.gmake}
. if !empty(PKGPATH:Mtextproc/sed)
MAKEFLAGS+= TOOLS_IGNORE.gsed=
. elif !empty(_TOOLS_USE_PKGSRC.gsed:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.gsed}+= gsed>=3.0.2:../../textproc/gsed
+TOOLS_DEPENDS.gsed?= gsed>=3.0.2:../../textproc/gsed
TOOLS_SYMLINK+= gsed
TOOLS_REAL_CMD.gsed= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}sed
. if exists(${TOOLS_REAL_CMD.gsed})
@@ -308,7 +308,7 @@ USE_TOOLS+= ${_t_}
# This is installed by pkgsrc bootstrap, and is never registered, so
# comment out the dependency on it.
#
-#${TOOLS_DEPMETHOD.pax}+= pax>=20040802:../../archivers/pax
+#TOOLS_DEPENDS.pax?= pax>=20040802:../../archivers/pax
TOOLS_REAL_CMD.gtar= ${LOCALBASE}/bin/tar
TOOLS_REAL_CMD.pax= ${LOCALBASE}/bin/pax
. for _t_ in ${_TOOLS_PAXUTILS}
@@ -343,7 +343,7 @@ USE_TOOLS+= ${_t_}
. if !empty(_TOOLS_USE_PKGSRC.gunzip:M[yY][eE][sS]) || \
!empty(_TOOLS_USE_PKGSRC.gzcat:M[yY][eE][sS]) || \
!empty(_TOOLS_USE_PKGSRC.gzip:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.gzip}+= gzip-base>=1.2.4b:../../archivers/gzip-base
+TOOLS_DEPENDS.gzip?= gzip-base>=1.2.4b:../../archivers/gzip-base
. for _t_ in ${_TOOLS_GZIPUTILS}
_TOOLS_USE_PKGSRC.${_t_}= yes
TOOLS_SYMLINK+= ${_t_}
@@ -361,6 +361,7 @@ ${_TOOLS_VARNAME.${_t_}}= ${TOOLS_REAL_CMD.${_t_}}
MAKEFLAGS+= TOOLS_IGNORE.lex=
. elif !empty(_TOOLS_USE_PKGSRC.lex:M[yY][eE][sS])
. include "../../devel/flex/buildlink3.mk"
+TOOLS_DEPENDS.lex?= ${BUILDLINK_DEPENDS.flex}:${BUILDLINK_PKGSRCDIR.flex}
TOOLS_SYMLINK+= lex
TOOLS_REAL_CMD.lex= ${LOCALBASE}/bin/flex
. if exists(${TOOLS_REAL_CMD.lex})
@@ -375,7 +376,7 @@ ${_TOOLS_VARNAME.lex}= ${TOOLS_REAL_CMD.lex}
. if !empty(PKGPATH:Mdevel/m4)
MAKEFLAGS+= TOOLS_IGNORE.m4=
. elif !empty(_TOOLS_USE_PKGSRC.m4:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.m4}+= m4>=1.4:../../devel/m4
+TOOLS_DEPENDS.m4?= m4>=1.4:../../devel/m4
TOOLS_SYMLINK+= m4
TOOLS_REAL_CMD.m4= ${LOCALBASE}/bin/gm4
. if exists(${TOOLS_REAL_CMD.m4})
@@ -392,7 +393,7 @@ MAKEFLAGS+= TOOLS_IGNORE.mtree=
# This is installed by pkgsrc bootstrap, and is never registered, so
# comment out the dependency on it.
#
-#${TOOLS_DEPMETHOD.mtree}+= mtree>=20040722:../../pkgtools/mtree
+#TOOLS_DEPENDS.mtree?= mtree>=20040722:../../pkgtools/mtree
TOOLS_SYMLINK+= mtree
TOOLS_REAL_CMD.mtree= ${LOCALBASE}/bin/mtree
. if exists(${TOOLS_REAL_CMD.mtree})
@@ -405,7 +406,7 @@ ${_TOOLS_VARNAME.mtree}= ${TOOLS_REAL_CMD.mtree}
. if !empty(PKGPATH:Mdevel/patch)
MAKEFLAGS+= TOOLS_IGNORE.patch=
. elif !empty(_TOOLS_USE_PKGSRC.patch:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.patch}+= patch>=2.2:../../devel/patch
+TOOLS_DEPENDS.patch?= patch>=2.2:../../devel/patch
TOOLS_SYMLINK+= patch
TOOLS_REAL_CMD.patch= ${LOCALBASE}/bin/gpatch
. if exists(${TOOLS_REAL_CMD.patch})
@@ -420,7 +421,7 @@ ${_TOOLS_VARNAME.patch}= ${TOOLS_REAL_CMD.patch}
. if !empty(PKGPATH:Mtextproc/nbsed)
MAKEFLAGS+= TOOLS_IGNORE.sed=
. elif !empty(_TOOLS_USE_PKGSRC.sed:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.sed}+= nbsed>=20040821:../../textproc/nbsed
+TOOLS_DEPENDS.sed?= nbsed>=20040821:../../textproc/nbsed
TOOLS_SYMLINK+= sed
TOOLS_REAL_CMD.sed= ${LOCALBASE}/bin/nbsed
. if exists(${TOOLS_REAL_CMD.sed})
@@ -433,7 +434,7 @@ ${_TOOLS_VARNAME.sed}= ${TOOLS_REAL_CMD.sed}
. if !empty(PKGPATH:Mshells/pdksh)
MAKEFLAGS+= TOOLS_IGNORE.sh=
. elif !empty(_TOOLS_USE_PKGSRC.sh:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.sh}+= pdksh>=5.2.14:../../shells/pdksh
+TOOLS_DEPENDS.sh?= pdksh>=5.2.14:../../shells/pdksh
TOOLS_SYMLINK+= sh
TOOLS_REAL_CMD.sh= ${LOCALBASE}/bin/pdksh
. if exists(${TOOLS_REAL_CMD.sh})
@@ -447,7 +448,7 @@ TOOLS_CMD.sh= ${TOOLS_DIR}/bin/sh
. if !empty(PKGPATH:Mpkgtools/shlock)
MAKEFLAGS+= TOOLS_IGNORE.shlock=
. elif !empty(_TOOLS_USE_PKGSRC.shlock:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.shlock}+= shlock>=20020114:../../pkgtools/shlock
+TOOLS_DEPENDS.shlock?= shlock>=20020114:../../pkgtools/shlock
TOOLS_SYMLINK+= shlock
TOOLS_REAL_CMD.shlock= ${LOCALBASE}/bin/shlock
. if exists(${TOOLS_REAL_CMD.shlock})
@@ -460,7 +461,7 @@ ${_TOOLS_VARNAME.shlock}= ${TOOLS_REAL_CMD.shlock}
. if !empty(PKGPATH:Mtextproc/groff)
MAKEFLAGS+= TOOLS_IGNORE.tbl=
. elif !empty(_TOOLS_USE_PKGSRC.tbl:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.tbl}+= groff>=1.19nb4:../../textproc/groff
+TOOLS_DEPENDS.tbl?= groff>=1.19nb4:../../textproc/groff
TOOLS_SYMLINK+= tbl
TOOLS_REAL_CMD.tbl= ${LOCALBASE}/bin/tbl
. if exists(${TOOLS_REAL_CMD.tbl})
@@ -475,7 +476,7 @@ ${_TOOLS_VARNAME.tbl}= ${TOOLS_REAL_CMD.tbl}
. if !empty(PKGPATH:Mdevel/bison)
MAKEFLAGS+= TOOLS_IGNORE.yacc=
. elif !empty(_TOOLS_USE_PKGSRC.yacc:M[yY][eE][sS])
-${TOOLS_DEPMETHOD.yacc}+= bison>=1.0:../../devel/bison
+TOOLS_DEPENDS.yacc?= bison>=1.0:../../devel/bison
TOOLS_WRAP+= yacc
TOOLS_REAL_CMD.yacc= ${LOCALBASE}/bin/bison
TOOLS_ARGS.yacc= -y
@@ -485,6 +486,16 @@ ${_TOOLS_VARNAME.yacc}= ${TOOLS_REAL_CMD.yacc} ${TOOLS_ARGS.yacc}
. endif
.endif
+# Add the dependencies for each pkgsrc-supplied tool.
+.for _t_ in ${_TOOLS_REPLACE_LIST}
+. if defined(TOOLS_DEPMETHOD.${_t_}) && defined(TOOLS_DEPENDS.${_t_}) && \
+ !empty(USE_TOOLS:M${_t_})
+. if empty(${TOOLS_DEPMETHOD.${_t_}}:M${TOOLS_DEPENDS.${_t_}})
+${TOOLS_DEPMETHOD.${_t_}}+= ${TOOLS_DEPENDS.${_t_}}
+. endif
+. endif
+.endfor
+
######################################################################
# Set TOOLS_REAL_CMD.<tool> appropriately in the case where we are