summaryrefslogtreecommitdiff
path: root/lib/rake/extensiontask.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rake/extensiontask.rb')
-rw-r--r--lib/rake/extensiontask.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb
index 644b6c8..99b3713 100644
--- a/lib/rake/extensiontask.rb
+++ b/lib/rake/extensiontask.rb
@@ -337,12 +337,18 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
if RUBY_PLATFORM =~ /mswin/ then
'nmake'
else
- ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') }
+ ENV['MAKE'] || %w[gmake make].find { |c|
+ system("#{c} -v >> #{dev_null} 2>&1")
+ }
end
end
@make
end
+ def dev_null
+ windows? ? 'NUL' : '/dev/null'
+ end
+
def source_files
@source_files ||= FileList["#{@ext_dir}/#{@source_pattern}"]
end