develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34152 - branches/vc9/config/inter

From:
rblasch
Date:
December 20, 2008 10:53
Subject:
[svn:parrot] r34152 - branches/vc9/config/inter
Message ID:
20081220185318.29212CBA12@x12.develooper.com
Author: rblasch
Date: Sat Dec 20 10:53:17 2008
New Revision: 34152

Modified:
   branches/vc9/config/inter/make.pm

Log:
Prefer nmake in canidate list if VC is used.


Modified: branches/vc9/config/inter/make.pm
==============================================================================
--- branches/vc9/config/inter/make.pm	(original)
+++ branches/vc9/config/inter/make.pm	Sat Dec 20 10:53:17 2008
@@ -45,7 +45,21 @@
     # first pick wins. On cygwin prefer make over nmake.
     $prog ||= $ENV{ uc($util) };
     $prog ||= $conf->options->get($util);
-    $prog ||= check_progs( $^O eq 'cygwin' ? ['gmake', 'make'] : ['gmake', 'mingw32-make', 'nmake', 'make'], $verbose );
+
+    my $canidates;
+    if ( $^O eq 'cygwin') {
+        # Cygwin
+        $canidates = ['gmake', 'make'];
+    }
+    elsif ($conf->option_or_data('cc') =~ /cl(\.exe)?$/) {
+        # Windows, Visual C++, prefer nmake
+        $canidates = [ 'nmake', 'mingw32-make', 'gmake', 'make' ];
+    }
+    else {
+        # Default
+        $canidates = ['gmake', 'mingw32-make', 'nmake', 'make'];
+    }
+    $prog ||= check_progs( $canidates, $verbose );
     if ( !$prog ) {
         $prog = ( $conf->options->get('ask') )
             ? prompt( $prompt, $prog ? $prog : $conf->data->get($util) )
@@ -59,10 +73,9 @@
         $self->set_result('yes');
     }
     else {
-        $prog = check_progs( [ 'gmake', 'mingw32-make', 'nmake', 'make' ], $verbose );
+        $prog = check_progs( $canidates, $verbose );
 
         unless ($prog) {
-
             # fall back to default
             $self->set_result('no');
             return 1;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About