summaryrefslogtreecommitdiff
path: root/cross/binutils
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-03-13 12:01:43 +0000
committeragc <agc@pkgsrc.org>2001-03-13 12:01:43 +0000
commitf8c0b800dd7208c03b3028aae61733119320edcf (patch)
tree46a34a6247a2f9e8b113268af9184b43a3c680e2 /cross/binutils
parent02882f6aaa886db08a2c3b7f1e23459fec77b931 (diff)
downloadpkgsrc-f8c0b800dd7208c03b3028aae61733119320edcf.tar.gz
Previous check (for "." being present in PATH) was incorrect in instances
where "." occurred after the directory containing ld. Rework the check to see which ld executable is actually found. Pointed out by Thomas Klausner.
Diffstat (limited to 'cross/binutils')
-rw-r--r--cross/binutils/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/cross/binutils/Makefile b/cross/binutils/Makefile
index 0e83fea0c4e..20746a7391c 100644
--- a/cross/binutils/Makefile
+++ b/cross/binutils/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2001/03/13 11:30:28 agc Exp $
+# $NetBSD: Makefile,v 1.26 2001/03/13 12:01:43 agc Exp $
#
# GNU binutils configured to hold `as many targets as the cross system is
# capable of using'. Configures and builds everything except gas, which
@@ -50,9 +50,15 @@ post-patch:
# check that path does not contain cwd
pre-configure:
- @if ${ECHO} ${PATH} | ${EGREP} '(^\.?:|:\.?$$|:\.?:)'; then \
+ @cd ${WRKDIR}; \
+ ${LN} -s ${CAT} ld; \
+ whichld=`${TYPE} ld | ${AWK} '{ print $$NF }'`; \
+ ${RM} -f ld; \
+ if [ "X$$whichld" = "X./ld" ]; then \
${ECHO} "Warning - \".\" is present in your path \"${PATH}\". Configuration step will fail"; \
- fi
+ ${ECHO} "Please remove \".\" from your path, so that the correct ld executable will be found."; \
+ ${FALSE}; \
+ fi; \
# we use MKDIR, not INSTALL_PROGRAM_DIR, deliberately.
do-install: