提交 ef75444d 编写于 作者: R Richard Levitte

Avoid sed for dependency post-processing

It turns out that different sed implementations treat -i differently
to cause issues.  make it simpler by avoiding it entirely and give
perl the trust to be consistent enough.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 239b84e5
...@@ -868,11 +868,6 @@ EOF ...@@ -868,11 +868,6 @@ EOF
} }
} }
# The combination of perl and sed takes advantage of their respective
# capabilities. Some sed implementations aren't greedy (enough), which
# is problematic with the some regexps. However, the sed d command is
# simply easier in sed.
#
# Should one wonder about the end of the Perl snippet, it's because this # Should one wonder about the end of the Perl snippet, it's because this
# second regexp eats up line endings as well, if the removed path is the # second regexp eats up line endings as well, if the removed path is the
# last in the line. We may therefore need to put back a line ending. # last in the line. We may therefore need to put back a line ending.
...@@ -894,8 +889,9 @@ $obj$depext: $deps ...@@ -894,8 +889,9 @@ $obj$depext: $deps
rm -f \$\@.tmp; touch \$\@.tmp rm -f \$\@.tmp; touch \$\@.tmp
-\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\ -\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\
2>/dev/null 2>/dev/null
perl -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_.="\\n" unless /\\R\$\$/g' \$\@.tmp perl -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; #\\
sed -i -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); #\\
\$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp
\@if ! cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\ \@if ! cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\
mv \$\@.tmp \$\@; \\ mv \$\@.tmp \$\@; \\
else \\ else \\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册