summaryrefslogtreecommitdiff
path: root/lib/rubygems/ext
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/ext')
-rw-r--r--lib/rubygems/ext/builder.rb2
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb7
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 548f1262a8..abcc09ce57 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -66,9 +66,11 @@ class Gem::Ext::Builder
# TODO use Process.spawn when ruby 1.8 support is dropped.
rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], nil
if verbose
+ puts("current directory: #{Dir.pwd}")
puts(command)
system(command)
else
+ results << "current directory: #{Dir.pwd}"
results << command
results << `#{command} #{redirector}`
end
diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb
index d11d1ac328..f5c4c8ce84 100644
--- a/lib/rubygems/ext/ext_conf_builder.rb
+++ b/lib/rubygems/ext/ext_conf_builder.rb
@@ -35,7 +35,12 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
begin
run cmd, results
ensure
- FileUtils.mv 'mkmf.log', dest_path if File.exist? 'mkmf.log'
+ if File.exist? 'mkmf.log'
+ results << "To see why this extension failed to compile, please check" \
+ " the mkmf.log which can be found here:\n"
+ results << " " + File.join(dest_path, 'mkmf.log') + "\n"
+ FileUtils.mv 'mkmf.log', dest_path
+ end
siteconf.unlink
end