From: Richard Levitte Date: Fri, 27 Mar 2015 00:41:00 +0000 (+0100) Subject: Fix some faults in util/mk1mf.pl X-Git-Tag: OpenSSL_1_1_0-pre1~1366 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8bf5b8ab22ccab31ff74d352dd370d81267e09a7;p=oweals%2Fopenssl.git Fix some faults in util/mk1mf.pl When building on Unix, there are times when the 'EX_LIB' MINFO variable contains valuable information. Make sure to take care of it. fixrules in util/pl/unix.pl was previously changed with a simpler fix of rules, with a comment claiming that's compatible with -j. Unfortunately, this breaks multiline rules and doesn't change anything for single line rules. While at it, do not prefix pure echo lines with a 'cd $(TEST_D) &&', as that's rather silly. Reviewed-by: Andy Polyakov --- diff --git a/util/mk1mf.pl b/util/mk1mf.pl index d3379d2a16..3ad17f629b 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -393,6 +393,9 @@ for (;;) if ($key eq "LIBKRB5") { $ex_libs .= " $val" if $val ne "";} + if ($key eq "EX_LIBS") + { $ex_libs .= " $val" if $val ne "";} + if ($key eq "TEST" && (!$fipscanisteronly || $dir =~ /^fips/ )) { $test.=&var_add($dir,$val, 0); } diff --git a/util/pl/unix.pl b/util/pl/unix.pl index df4de71f50..c4b7e8ee2a 100644 --- a/util/pl/unix.pl +++ b/util/pl/unix.pl @@ -230,8 +230,8 @@ sub fixrules my ($str) = @_; # Compatible with -j... - $str =~ s/^(\s+@?)/$1cd \$(TEST_D) && /; - return $str; +# $str =~ s/^(\s+@?)/$1cd \$(TEST_D) && /; +# return $str; # Compatible with not -j. my @t = split("\n", $str); @@ -243,11 +243,11 @@ sub fixrules if (!$prev) { if ($t =~ /^@/) - { + { $t =~ s/^@/\@cd \$(TEST_D) && /; } - elsif ($t !~ /^\s*#/) - { + elsif ($t !~ /^\s*#/ && $t !~ /^echo/) + { $t = 'cd $(TEST_D) && ' . $t; } }