Last active
August 29, 2015 14:25
-
-
Save jpluimers/878c04d189d6274d7bb1 to your computer and use it in GitHub Desktop.
git diff of openssl/Configure to generate Makefile with makedepend replaced by $(CC) -M when not existing (for instance on darwin systems)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Configure b/Configure | |
index 5fb57cf..0f62f5d 100755 | |
--- a/Configure | |
+++ b/Configure | |
@@ -7,6 +7,7 @@ eval 'exec perl -S $0 ${1+"$@"}' | |
require 5.000; | |
use strict; | |
+use File::Which; | |
# see INSTALL for instructions. | |
@@ -1674,6 +1675,8 @@ if ($strict_warnings) | |
} | |
} | |
+my $makedepend_exe_path = which('makedepend'); | |
+ | |
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n"; | |
unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new"; | |
open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n"; | |
@@ -1723,6 +1726,10 @@ while (<IN>) | |
s/^RANLIB=.*/RANLIB= $ranlib/; | |
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; | |
} | |
+ if ($makedepend_exe_path eq "") | |
+ { | |
+ s/^MAKEDEPPROG=\s*makedepend.*$/MAKEDEPPROG= \$\(CC\) -v -M/; | |
+ } | |
s/^CFLAG=.*$/CFLAG= $cflags/; | |
s/^DEPFLAG=.*$/DEPFLAG=$depflags/; | |
s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/; | |
diff --git a/util/domd b/util/domd | |
index bab48cb..4a867c6 100755 | |
--- a/util/domd | |
+++ b/util/domd | |
@@ -14,7 +14,7 @@ if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi | |
cp Makefile Makefile.save | |
# fake the presence of Kerberos | |
touch $TOP/krb5.h | |
-if expr "$MAKEDEPEND" : '.*gcc$' > /dev/null; then | |
+if expr "$MAKEDEPEND" : '.*cc$' > /dev/null; then | |
args="" | |
while [ $# -gt 0 ]; do | |
if [ "$1" != "--" ]; then args="$args $1"; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment