diff options
Diffstat (limited to 'devel/bmake/files/boot-strap')
-rwxr-xr-x | devel/bmake/files/boot-strap | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/devel/bmake/files/boot-strap b/devel/bmake/files/boot-strap index e5f60a6b651..83539d5e484 100755 --- a/devel/bmake/files/boot-strap +++ b/devel/bmake/files/boot-strap @@ -63,7 +63,7 @@ # Simon J. Gerraty <sjg@crufty.net> # RCSid: -# $Id: boot-strap,v 1.10 2011/06/18 22:39:46 bsiegert Exp $ +# $Id: boot-strap,v 1.11 2013/10/31 12:18:19 obache Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -236,6 +236,18 @@ add_path () { no_path $* && eval ${2:-PATH}="$__p${__p:+:}$1" } +find_prog () { + saved_IFS="$IFS" + IFS=":" + for p in $PATH; do + if [ -x "$p/$1" ]; then + echo "$p/$1" + break; + fi + done + IFS="$saved_IFS"; +} + srcdir=`GetDir /bmake "$srcdir" "$2" "$Mydir" ./bmake* "$Mydir"/../bmake*` [ -d "${srcdir:-/dev/null}" ] || Usage @@ -310,7 +322,7 @@ if [ -s "${mksrc:-/dev/null}/install-mk" ]; then esac fi # make sure test below uses the same diff that configure did -TOOL_DIFF=`type diff | sed 's,[()],,g;s,^[^/][^/]*,,;q'` +TOOL_DIFF=`find_prog diff` export MAKESYSPATH TOOL_DIFF if [ "$mksrc" ]; then $objdir/bmake test || exit 1 |