Commit 58dd1ce9 authored by Emilia Kasper's avatar Emilia Kasper
Browse files

make depend: prefer clang over makedepend



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 4ec36aff
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1635,10 +1635,11 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
	$shlib_minor=$2;
	}

if ($strict_warnings)
	{
my $ecc = $cc;
$ecc = "clang" if `$cc --version 2>&1` =~ /clang/;

if ($strict_warnings)
	{
	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/;
+2 −1
Original line number Diff line number Diff line
@@ -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