[svn:parrot] r37439 - trunk/config/inter

rblasch at svn.parrot.org rblasch at svn.parrot.org
Sun Mar 15 15:36:37 UTC 2009


Author: rblasch
Date: Sun Mar 15 15:36:36 2009
New Revision: 37439
URL: https://trac.parrot.org/parrot/changeset/37439

Log:
[config] Prefer nmake over mingw32-make when using VC++.

Modified:
   trunk/config/inter/make.pm

Modified: trunk/config/inter/make.pm
==============================================================================
--- trunk/config/inter/make.pm	Sun Mar 15 13:53:29 2009	(r37438)
+++ trunk/config/inter/make.pm	Sun Mar 15 15:36:36 2009	(r37439)
@@ -38,14 +38,31 @@
     # undef means we don't have GNU make... default to not having it
     $conf->data->set( gmake_version => undef );
 
+    my $canidates;
+    if ( $^O eq 'cygwin') {
+        # On Cygwin prefer make over nmake.
+        $canidates = ['gmake', 'make'];
+    }
+    elsif ($conf->option_or_data('cc') =~ /cl(\.exe)?$/i) {
+        # Windows, Visual C++, prefer nmake
+        # This test should use something more stable than the compiler
+        # executable name.  'msvcversion' might be good, but is determined
+        # after this check.
+        $canidates = [ 'nmake', 'mingw32-make', 'gmake', 'make' ];
+    }
+    else {
+        # Default
+        $canidates = ['gmake', 'mingw32-make', 'nmake', 'make'];
+    }
+
     my $prog;
 
     # check the candidates for a 'make' program in this order:
     # environment ; option ; probe ; ask ; default
-    # first pick wins. On cygwin prefer make over nmake.
+    # first pick wins.
     $prog ||= $ENV{ uc($util) };
     $prog ||= $conf->options->get($util);
-    $prog ||= check_progs( $^O eq 'cygwin' ? ['gmake', 'make'] : ['gmake', 'mingw32-make', 'nmake', 'make'], $verbose );
+    $prog ||= check_progs( $canidates, $verbose );
     if ( !$prog ) {
         $prog = ( $conf->options->get('ask') )
             ? prompt( $prompt, $prog ? $prog : $conf->data->get($util) )
@@ -59,7 +76,7 @@
         $self->set_result('yes');
     }
     else {
-        $prog = check_progs( [ 'gmake', 'mingw32-make', 'nmake', 'make' ], $verbose );
+        $prog = check_progs( $canidates, $verbose );
 
         unless ($prog) {
 


More information about the parrot-commits mailing list