From 8cd05857c696dc4c576bf392afbc749fba5b30eb Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 12 May 2016 23:35:22 +0000 Subject: extmk.rb: failures format * ext/extmk.rb: show extension failures in compilation-mode friendly format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ext/extmk.rb b/ext/extmk.rb index 5170cd653b..53d86b6019 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -256,7 +256,7 @@ def extmake(target) Logging::message(error.to_s) if error Logging::message("Failed to configure #{target}. It will not be installed.\n") end - return [target, error] + return [conf, error] end args = sysquote($mflags) unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR") @@ -745,7 +745,16 @@ if $configure_only and $command_output unless fails.empty? mf.puts %Q<\t@echo "*** Following extensions failed to configure:"> fails.each do |d, e| - mf.puts %Q<\t@echo " #{d}#{e && %Q(: #{e})}"> + if e && e.respond_to?(:backtrace_locations) + n = e.backtrace_locations[0].lineno + else + n = 0 + end + d = "#{d}:#{n}:" + if e + d << " " << e.message + end + mf.puts %Q<\t@echo "#{d}"> end mf.puts %Q<\t@echo "*** Fix the problems, then remove these directories and try again if you want."> end -- cgit v1.2.3