You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/06/19 08:34:03 UTC

[lucy-commits] svn commit: r1137301 - in /incubator/lucy/trunk: perl/buildlib/Lucy/Build.pm ruby/Rakefile

Author: marvin
Date: Sun Jun 19 06:34:03 2011
New Revision: 1137301

URL: http://svn.apache.org/viewvc?rev=1137301&view=rev
Log:
Only prefer "Makefile.win" if there is one.

Modified:
    incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
    incubator/lucy/trunk/ruby/Rakefile

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm?rev=1137301&r1=1137300&r2=1137301&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm Sun Jun 19 06:34:03 2011
@@ -134,15 +134,18 @@ sub _run_make {
     my ( $self, %params ) = @_;
     my @command = @{ $params{args} };
     my $dir = $params{dir};
+    my $current_directory = getcwd();
+    chdir $dir if $dir;
     unshift @command, 'CC=' . $self->config('cc');
     if ( $self->config('cc') =~ /^cl\b/ ) {
-        unshift @command, "nmake", "-f", "Makefile.win";
+        if ( -f "Makefile.win" ) {
+            unshift @command, "-f", "Makefile.win";
+        }
+        unshift @command, "nmake";
     }
     else {
         unshift @command, "make";
     }
-    my $current_directory = getcwd();
-    chdir $dir if $dir;
     system(@command) and confess("Make failed");
     chdir $current_directory if $dir;
 }

Modified: incubator/lucy/trunk/ruby/Rakefile
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/ruby/Rakefile?rev=1137301&r1=1137300&r2=1137301&view=diff
==============================================================================
--- incubator/lucy/trunk/ruby/Rakefile (original)
+++ incubator/lucy/trunk/ruby/Rakefile Sun Jun 19 06:34:03 2011
@@ -39,15 +39,18 @@ def all_ccflags
 end
 
 def run_make(dir, params)
+  current_dir = Dir.pwd
+  chdir(dir) if dir
   command = params.clone
   command.unshift("CC=#{cc_command}")
-  if cc_command =~ /^cl\b/
-    command.unshift("nmake", "-f", "Makefile.win")
+  if cc_command =~ /^cl\b/ 
+    if File.exists?("Makefile.win")
+      command.unshift("-f", "Makefile.win")
+    end
+    command.unshift("nmake")
   else
     command.unshift("make")
   end
-  current_dir = Dir.pwd
-  chdir(dir) if dir
   success = system(*command)
   if !success
     raise "Make failed"