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 <appro@openssl.org>
This commit is contained in:
Richard Levitte 2015-03-27 01:41:00 +01:00
parent e93c8748ab
commit 8bf5b8ab22
2 changed files with 8 additions and 5 deletions

View File

@ -393,6 +393,9 @@ for (;;)
if ($key eq "LIBKRB5") if ($key eq "LIBKRB5")
{ $ex_libs .= " $val" if $val ne "";} { $ex_libs .= " $val" if $val ne "";}
if ($key eq "EX_LIBS")
{ $ex_libs .= " $val" if $val ne "";}
if ($key eq "TEST" && (!$fipscanisteronly || $dir =~ /^fips/ )) if ($key eq "TEST" && (!$fipscanisteronly || $dir =~ /^fips/ ))
{ $test.=&var_add($dir,$val, 0); } { $test.=&var_add($dir,$val, 0); }

View File

@ -230,8 +230,8 @@ sub fixrules
my ($str) = @_; my ($str) = @_;
# Compatible with -j... # Compatible with -j...
$str =~ s/^(\s+@?)/$1cd \$(TEST_D) && /; # $str =~ s/^(\s+@?)/$1cd \$(TEST_D) && /;
return $str; # return $str;
# Compatible with not -j. # Compatible with not -j.
my @t = split("\n", $str); my @t = split("\n", $str);
@ -243,11 +243,11 @@ sub fixrules
if (!$prev) if (!$prev)
{ {
if ($t =~ /^@/) if ($t =~ /^@/)
{ {
$t =~ s/^@/\@cd \$(TEST_D) && /; $t =~ s/^@/\@cd \$(TEST_D) && /;
} }
elsif ($t !~ /^\s*#/) elsif ($t !~ /^\s*#/ && $t !~ /^echo/)
{ {
$t = 'cd $(TEST_D) && ' . $t; $t = 'cd $(TEST_D) && ' . $t;
} }
} }