Restore makedepend capabilities for Windows and VMS
authorRichard Levitte <levitte@openssl.org>
Mon, 11 Dec 2017 19:54:07 +0000 (20:54 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 12 Dec 2017 16:21:46 +0000 (17:21 +0100)
This got lost somehow.  The methods to do makedepend on Windows and
VMS are hard coded for cl (Windows) and CC/DECC (VMS), because that's
what we currently support natively.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4907)

Configure

index 5abbd72a9718c3eb7f1aa0774cd52980e1c0e420..ba646f030a8480b1861bd035e266c655ff9f79c0 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1279,12 +1279,19 @@ unless ($disabled{asm}) {
 
 my %predefined = compiler_predefined($target{cc});
 
 
 my %predefined = compiler_predefined($target{cc});
 
+# Check for makedepend capabilities.
 if (!$disabled{makedepend}) {
 if (!$disabled{makedepend}) {
-    # We know that GNU C version 3 and up as well as all clang
-    # versions support dependency generation
-    if ($predefined{__GNUC__} >= 3) {
+    if ($config{target} =~ /^(VC|vms)-/) {
+        # For VC- and vms- targets, there's nothing more to do here.  The
+        # functionality is hard coded in the corresponding build files for
+        # cl (Windows) and CC/DECC (VMS).
+    } elsif ($predefined{__GNUC__} >= 3) {
+        # We know that GNU C version 3 and up as well as all clang
+        # versions support dependency generation
         $config{makedepprog} = "\$(CROSS_COMPILE)$target{cc}";
     } else {
         $config{makedepprog} = "\$(CROSS_COMPILE)$target{cc}";
     } else {
+        # In all other cases, we look for 'makedepend', and disable the
+        # capability if not found.
         $config{makedepprog} = which('makedepend');
         $disabled{makedepend} = "unavailable" unless $config{makedepprog};
     }
         $config{makedepprog} = which('makedepend');
         $disabled{makedepend} = "unavailable" unless $config{makedepprog};
     }