summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Lavena <luislavena@gmail.com>2009-12-13 06:47:51 -0300
committerLuis Lavena <luislavena@gmail.com>2009-12-13 06:47:51 -0300
commit2d0068e5223ae410be815a92f01cdd6b5c9cd95f (patch)
treea81fab52124ad33530694f955c637f6ed0565ccb
parentab252aa2e52948b3d724876ee591078bb271b888 (diff)
downloadrake-compiler-2d0068e5223ae410be815a92f01cdd6b5c9cd95f.tar.gz
Silence make program lookup
-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