From 8bf5b8ab22ccab31ff74d352dd370d81267e09a7 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 27 Mar 2015 01:41:00 +0100 Subject: [PATCH] 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 --- util/mk1mf.pl | 3 +++ util/pl/unix.pl | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) 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; } } -- 2.25.1