Commit e2d2b4b7 authored by simonmar's avatar simonmar
Browse files

[project @ 2000-11-03 11:25:35 by simonmar]

Prepend "./" to the command to run only if the file exists in the
current directory, rather than based on whether the command begins
with a ''/'.  This means that 'make HC=ghc-4.08.1' in ghc/tests works
as expected.
parent 98dbad12
...@@ -73,7 +73,7 @@ $CacheProf = 'no'; ...@@ -73,7 +73,7 @@ $CacheProf = 'no';
die "$Pgm: program to run not given as first argument\n" if $#ARGV < 0; die "$Pgm: program to run not given as first argument\n" if $#ARGV < 0;
$ToRun = $ARGV[0]; shift(@ARGV); $ToRun = $ARGV[0]; shift(@ARGV);
# avoid picking up same-named thing from somewhere else on $PATH... # avoid picking up same-named thing from somewhere else on $PATH...
$ToRun = "./$ToRun" if $ToRun !~ /^\//; $ToRun = "./$ToRun" if -e "./$ToRun";
arg: while ($_ = $ARGV[0]) { arg: while ($_ = $ARGV[0]) {
shift(@ARGV); shift(@ARGV);
......
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