Skip to content
Snippets Groups Projects
Commit d6583562 authored by Niels Möller's avatar Niels Möller
Browse files

(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
No related branches found
No related tags found
No related merge requests found
...@@ -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 () {
case "$1" in
*/*)
echo "$1"
;;
*)
if [ -x "$1" ] ; then if [ -x "$1" ] ; then
echo "./$1" echo "./$1"
else else
echo "$srcdir/$1" echo "$srcdir/$1"
fi fi
;;
esac
} }
env_program () { env_program () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment