summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-08-17 04:06:36 +0000
committerjlam <jlam@pkgsrc.org>2003-08-17 04:06:36 +0000
commita8e872425a4e217293246db89cc1aa436fcc265b (patch)
tree37dfff7333719777b336cc9e1d0b6ca1cf241cad /mk
parent159a2c30827b55bcd11bdab4b477176467c90577 (diff)
downloadpkgsrc-a8e872425a4e217293246db89cc1aa436fcc265b.tar.gz
Avoid circular dependencies if USE_GNU_TOOLS is set unconditionally in
either the environment or in /etc/mk.conf by telling dependencies of the named GNU tool to ignore any USE_GNU_TOOLS settings when they are built.
Diffstat (limited to 'mk')
-rw-r--r--mk/tools.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/mk/tools.mk b/mk/tools.mk
index c7b83bfa49d..b0c6443e566 100644
--- a/mk/tools.mk
+++ b/mk/tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: tools.mk,v 1.8 2003/08/17 02:03:53 jlam Exp $
+# $NetBSD: tools.mk,v 1.9 2003/08/17 04:06:36 jlam Exp $
#
# This Makefile creates a ${TOOLS_DIR} directory and populates the bin
# subdir with tools that hide the ones outside of ${TOOLS_DIR}.
@@ -115,6 +115,12 @@ ${TOOLS_DIR}/bin/makeinfo: ${_GNU_MISSING}
_TOOLS= awk grep sed
+.if defined(_IGNORE_USE_GNU_TOOLS)
+USE_GNU_TOOLS:= # empty
+.else
+USE_GNU_TOOLS?= # empty
+.endif
+
# These platforms already have GNU versions of the tools in the base
# system, so no need to pull in the pkgsrc versions; we will use these
# instead.
@@ -188,6 +194,10 @@ _TOOLS_OVERRIDE.awk= YES
_TOOLS_PROGNAME.awk= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}awk
AWK:= ${_TOOLS_PROGNAME.awk}
.endif
+.if !empty(PKGPATH:Mlang/gawk)
+_TOOLS_OVERRIDE.awk= NO
+MAKEFLAGS+= _IGNORE_USE_GNU_TOOLS=
+.endif
.if ${_TOOLS_REPLACE.grep} == "YES"
_TOOLS_OVERRIDE.grep= YES
@@ -199,6 +209,10 @@ _TOOLS_OVERRIDE.grep= YES
_TOOLS_PROGNAME.grep= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}grep
GREP:= ${_TOOLS_PROGNAME.grep}
.endif
+.if !empty(PKGPATH:Mtextproc/grep)
+_TOOLS_OVERRIDE.grep= NO
+MAKEFLAGS+= _IGNORE_USE_GNU_TOOLS=
+.endif
.if ${_TOOLS_REPLACE.sed} == "YES"
_TOOLS_OVERRIDE.sed= YES
@@ -210,6 +224,10 @@ _TOOLS_OVERRIDE.sed= YES
_TOOLS_PROGNAME.sed= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}sed
SED:= ${_TOOLS_PROGNAME.sed}
.endif
+.if !empty(PKGPATH:Mtextproc/gsed)
+_TOOLS_OVERRIDE.sed= NO
+MAKEFLAGS+= _IGNORE_USE_GNU_TOOLS=
+.endif
# If _TOOLS_OVERRIDE.<tool> is actually set to "YES", then we override
# the tool with the one specified in _TOOLS_PROGNAME.<tool>.