make depend: prefer clang over makedepend
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
a20d9422cf
commit
c97c7f8d53
2 changed files with 6 additions and 3 deletions
|
@ -1647,10 +1647,11 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
|
||||||
$shlib_minor=$2;
|
$shlib_minor=$2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $ecc = $cc;
|
||||||
|
$ecc = "clang" if `$cc --version 2>&1` =~ /clang/;
|
||||||
|
|
||||||
if ($strict_warnings)
|
if ($strict_warnings)
|
||||||
{
|
{
|
||||||
my $ecc = $cc;
|
|
||||||
$ecc = "clang" if `$cc --version 2>&1` =~ /clang/;
|
|
||||||
my $wopt;
|
my $wopt;
|
||||||
die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/);
|
die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/);
|
||||||
foreach $wopt (split /\s+/, $gcc_devteam_warn)
|
foreach $wopt (split /\s+/, $gcc_devteam_warn)
|
||||||
|
@ -1714,6 +1715,7 @@ while (<IN>)
|
||||||
s/^AR=\s*ar/AR= $ar/;
|
s/^AR=\s*ar/AR= $ar/;
|
||||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||||
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
|
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
|
||||||
|
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang";
|
||||||
}
|
}
|
||||||
s/^CFLAG=.*$/CFLAG= $cflags/;
|
s/^CFLAG=.*$/CFLAG= $cflags/;
|
||||||
s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
|
s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
|
||||||
|
|
|
@ -14,7 +14,8 @@ if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
|
||||||
cp Makefile Makefile.save
|
cp Makefile Makefile.save
|
||||||
# fake the presence of Kerberos
|
# fake the presence of Kerberos
|
||||||
touch $TOP/krb5.h
|
touch $TOP/krb5.h
|
||||||
if expr "$MAKEDEPEND" : '.*gcc$' > /dev/null; then
|
if ${MAKEDEPEND} --version 2>&1 | grep -q "clang" ||
|
||||||
|
echo $MAKEDEPEND | grep -q "gcc"; then
|
||||||
args=""
|
args=""
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
if [ "$1" != "--" ]; then args="$args $1"; fi
|
if [ "$1" != "--" ]; then args="$args $1"; fi
|
||||||
|
|
Loading…
Reference in a new issue