From: Paul Smith Date: Mon, 16 Dec 2019 21:18:58 +0000 (-0500) Subject: * tests/run_make_tests.pl (subst_make_string): Force use of / X-Git-Tag: 4.2.93~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acbef3f612f46411e720c52bee70014df1c2f4fd;p=thirdparty%2Fmake.git * tests/run_make_tests.pl (subst_make_string): Force use of / On Windows the path to the helper tool will contain '\': this will fail if recipes are run with a POSIX shell. Convert '\' to '/' on Windows. While here, escape any spaces in the path as well. --- diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl index 8cdf6c7f..3807b34e 100644 --- a/tests/run_make_tests.pl +++ b/tests/run_make_tests.pl @@ -220,7 +220,11 @@ sub valid_option # [2] (string): Answer we should get back. # [3] (integer): Exit code we expect. A missing code means 0 (success) +$makefile = undef; $old_makefile = undef; +$mkpath = undef; +$make_name = undef; +$helptool = undef; sub subst_make_string { @@ -230,9 +234,8 @@ sub subst_make_string s/#MAKE#/$make_name/g; s/#PERL#/$perl_name/g; s/#PWD#/$cwdpath/g; - my $help = File::Spec->catfile($fqsrcdir, 'tests', 'thelp.pl'); # If we're using a shell - s/#HELPER#/$perl_name $help/g; + s/#HELPER#/$perl_name $helptool/g; return $_; } @@ -615,6 +618,14 @@ sub set_more_defaults $fqsrcdir = File::Spec->rel2abs($srcdir); $fqblddir = File::Spec->rel2abs($blddir); + # Find the helper tool + $helptool = File::Spec->catfile($fqsrcdir, 'tests', 'thelp.pl'); + + # It's difficult to quote this properly in all the places it's used so + # ensure it doesn't need to be quoted. + $helptool =~ s,\\,/,g if $port_type = 'W32'; + $helptool =~ s, ,\\ ,g; + # Get Purify log info--if any. if (exists $ENV{PURIFYOPTIONS}