ruby-changes:42938
From: nobu <ko1@a...>
Date: Mon, 16 May 2016 09:16:18 +0900 (JST)
Subject: [ruby-changes:42938] nobu:r55012 (trunk): extmk.rb: fix skipping messages
nobu 2016-05-16 09:16:13 +0900 (Mon, 16 May 2016) New Revision: 55012 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55012 Log: extmk.rb: fix skipping messages * ext/extmk.rb (extmake): select the message if skipped because its parent extension is not configured. Modified files: trunk/ext/extmk.rb Index: ext/extmk.rb =================================================================== --- ext/extmk.rb (revision 55011) +++ ext/extmk.rb (revision 55012) @@ -236,6 +236,7 @@ def extmake(target) https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L236 rescue SystemExit # ignore rescue => error + lineno = error.backtrace_locations[0].lineno ok = false ensure rm_f "conftest*" @@ -252,11 +253,18 @@ def extmake(target) https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L253 return true if !error and target.start_with?("-") + if parent + message = "Failed to configure #{target}. It will not be installed." + else + message = "Skipped to configure #{target}. Its parent is not configured." + end if Logging.log_opened? Logging::message(error.to_s) if error - Logging::message("Failed to configure #{target}. It will not be installed.\n") + Logging::message(message) end - return [conf, error] + message = error.message if error + + return parent ? [conf, lineno||0, message] : true end args = sysquote($mflags) unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR") @@ -744,15 +752,10 @@ if $configure_only and $command_output https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L752 mf.puts "\n""note:\n" unless fails.empty? mf.puts %Q<\t@echo "*** Following extensions failed to configure:"> - fails.each do |d, e| - if e && e.respond_to?(:backtrace_locations) - n = e.backtrace_locations[0].lineno - else - n = 0 - end + fails.each do |d, n, e| d = "#{d}:#{n}:" if e - d << " " << e.message + d << " " << e end mf.puts %Q<\t@echo "#{d}"> end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/