aboutsummaryrefslogtreecommitdiff
path: root/Configurations
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-03-12 01:06:48 +0100
committerRichard Levitte <levitte@openssl.org>2016-03-12 01:15:12 +0100
commitef75444d0873ab4b35070b6362867b7b712515e6 (patch)
tree45268a74139276ba5aef984b65bdf90ba49d1dad /Configurations
parent239b84e592386d6053e16295f80bb85f65ce3ef9 (diff)
downloadopenssl-ef75444d0873ab4b35070b6362867b7b712515e6.zip
openssl-ef75444d0873ab4b35070b6362867b7b712515e6.tar.gz
openssl-ef75444d0873ab4b35070b6362867b7b712515e6.tar.bz2
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: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/unix-Makefile.tmpl10
1 files changed, 3 insertions, 7 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index e6dba5d..ffe7551 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -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
# 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.
@@ -894,8 +889,9 @@ $obj$depext: $deps
rm -f \$\@.tmp; touch \$\@.tmp
-\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\
2>/dev/null
- perl -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_.="\\n" unless /\\R\$\$/g' \$\@.tmp
- sed -i -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp
+ perl -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; #\\
+ \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); #\\
+ \$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp
\@if ! cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\
mv \$\@.tmp \$\@; \\
else \\