mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
make depend: prefer clang over makedepend
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
4ec36aff2a
commit
58dd1ce91a
@ -1635,10 +1635,11 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
|
||||
$shlib_minor=$2;
|
||||
}
|
||||
|
||||
my $ecc = $cc;
|
||||
$ecc = "clang" if `$cc --version 2>&1` =~ /clang/;
|
||||
|
||||
if ($strict_warnings)
|
||||
{
|
||||
my $ecc = $cc;
|
||||
$ecc = "clang" if `$cc --version 2>&1` =~ /clang/;
|
||||
my $wopt;
|
||||
die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc(-\d(\.\d)*)?$/ or $ecc =~ /clang$/);
|
||||
foreach $wopt (split /\s+/, $gcc_devteam_warn)
|
||||
@ -1703,7 +1704,7 @@ while (<IN>)
|
||||
s/^CC=.*$/CC= $cc/;
|
||||
s/^AR=\s*ar/AR= $ar/;
|
||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc" || ($cc eq 'cc' && $target =~ /darwin/);
|
||||
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang";
|
||||
}
|
||||
s/^CFLAG=.*$/CFLAG= $cflags/;
|
||||
s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
|
||||
|
@ -12,7 +12,8 @@ fi
|
||||
if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
|
||||
|
||||
cp Makefile Makefile.save
|
||||
if expr "$MAKEDEPEND" : '.*cc' > /dev/null; then
|
||||
if ${MAKEDEPEND} --version 2>&1 | grep -q "clang" ||
|
||||
echo $MAKEDEPEND | grep -q "gcc"; then
|
||||
args=""
|
||||
while [ $# -gt 0 ]; do
|
||||
if [ "$1" != "--" ]; then args="$args $1"; fi
|
||||
|
Loading…
Reference in New Issue
Block a user