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 2012/03/17 23:14:50 UTC

[lucy-commits] svn commit: r1302026 - /incubator/lucy/trunk/clownfish/ruby/Rakefile

Author: marvin
Date: Sat Mar 17 22:14:50 2012
New Revision: 1302026

URL: http://svn.apache.org/viewvc?rev=1302026&view=rev
Log:
Improve portability of "make" command.

Identify "mingw" as a Windows environment.  Fall back to "make" rather than
"dmake".

Modified:
    incubator/lucy/trunk/clownfish/ruby/Rakefile

Modified: incubator/lucy/trunk/clownfish/ruby/Rakefile
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/ruby/Rakefile?rev=1302026&r1=1302025&r2=1302026&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/ruby/Rakefile (original)
+++ incubator/lucy/trunk/clownfish/ruby/Rakefile Sat Mar 17 22:14:50 2012
@@ -149,16 +149,14 @@ def make_command
   command = rbconfig["make-prog"]
   if !command
     if RUBY_PLATFORM =~ /mswin/i
-      cc = cc_command
-      if cc =~ /^cl\b/
+      if cc_command =~ /^cl\b/
         command = "nmake"
-      else
-        command = "dmake"
       end
-    else
-      command = "make"
     end
   end
+  if !command
+    command = 'make'
+  end
   return command
 end
 
@@ -167,7 +165,7 @@ def run_make(dir, params)
   chdir(dir) if dir
   command = params.clone
   command.unshift("CC=#{cc_command}")
-  if RUBY_PLATFORM =~ /mswin/i
+  if RUBY_PLATFORM =~ /(mswin|mingw)/i
     if cc_command =~ /^cl\b/ 
       command.unshift("-f", "Makefile.MSVC")
     else