Skip to content

Commit

Permalink
Another make adjustment for win32
Browse files Browse the repository at this point in the history
git-svn-id: http://rubyeventmachine.com/svn/trunk@805 2c60eb90-88cd-488e-9351-1edcb1d70dbc
  • Loading branch information
raggi committed Nov 28, 2008
1 parent 8abc164 commit 39b7476
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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__}
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -126,7 +127,7 @@ namespace :ext do
desc "make extension"
task :make => [:makefile] do
chdir 'ext' do
sh 'make'
sh MAKE
end
end

Expand Down

0 comments on commit 39b7476

Please sign in to comment.