Commit d6583562 authored by Niels Möller's avatar Niels Möller

(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
parent 71d77a6c
...@@ -12,12 +12,21 @@ fi ...@@ -12,12 +12,21 @@ fi
export srcdir export srcdir
# When used in make rules, we sometimes get the filenames VPATH
# expanded, but usually not.
find_program () { find_program () {
if [ -x "$1" ] ; then case "$1" in
echo "./$1" */*)
else echo "$1"
echo "$srcdir/$1" ;;
fi *)
if [ -x "$1" ] ; then
echo "./$1"
else
echo "$srcdir/$1"
fi
;;
esac
} }
env_program () { env_program () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment