From 39b7476dda90dc1f4e657b182eedc564a74d555c Mon Sep 17 00:00:00 2001 From: raggi Date: Fri, 28 Nov 2008 13:15:15 +0000 Subject: [PATCH] Another make adjustment for win32 git-svn-id: http://rubyeventmachine.com/svn/trunk@805 2c60eb90-88cd-488e-9351-1edcb1d70dbc --- Rakefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index f0a12cca0..09d585ff8 100644 --- a/Rakefile +++ b/Rakefile @@ -38,6 +38,12 @@ Dir.glob('tasks/*.rake').each { |r| Rake.application.add_import r } $eventmachine_library = :java if RUBY_PLATFORM =~ /java/ || ENV['EVENTMACHINE_LIBRARY'] == 'java' $eventmachine_library = :pure_ruby if ENV['EVENTMACHINE_LIBRARY'] == 'pure_ruby' +MAKE = ENV['MAKE'] || if RUBY_PLATFORM =~ /mswin/ # mingw uses make. + 'nmake' +else + 'make' +end + # If running under rubygems... __DIR__ ||= File.expand_path(File.dirname(__FILE__)) if Gem.path.any? {|path| %r(^#{Regexp.escape path}) =~ __DIR__} @@ -65,12 +71,7 @@ task :dummy_build # Basic clean definition, this is enhanced by imports aswell. task :clean do chdir 'ext' do - make = if RUBY_PLATFORM =~ /mswin/ # mingw uses make. - 'nmake' - else - 'make' - end - sh "#{make} clean" if test ?e, 'Makefile' + sh "#{MAKE} clean" if test ?e, 'Makefile' end Dir.glob('**/Makefile').each { |file| rm file } Dir.glob('**/*.{o,so,bundle,class,jar,dll,log}').each { |file| rm file } @@ -126,7 +127,7 @@ namespace :ext do desc "make extension" task :make => [:makefile] do chdir 'ext' do - sh 'make' + sh MAKE end end