From: Niels Möller Date: Fri, 25 Nov 2005 17:09:28 +0000 (+0100) Subject: (find_program): If argument contains a slash X-Git-Tag: nettle_1.14_release_20051205~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d65835621dd3c731cee345a47d7a293fc12d9331;p=thirdparty%2Fnettle.git (find_program): If argument contains a slash (most likely because VPATH expansion in make), return the filename as is. Rev: misc/run-tests:1.5 --- diff --git a/run-tests b/run-tests index a15c744c..f240599f 100755 --- a/run-tests +++ b/run-tests @@ -12,12 +12,21 @@ fi export srcdir +# When used in make rules, we sometimes get the filenames VPATH +# expanded, but usually not. find_program () { - if [ -x "$1" ] ; then - echo "./$1" - else - echo "$srcdir/$1" - fi + case "$1" in + */*) + echo "$1" + ;; + *) + if [ -x "$1" ] ; then + echo "./$1" + else + echo "$srcdir/$1" + fi + ;; + esac } env_program () {