mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
extmk.rb: fix skipping messages
* ext/extmk.rb (extmake): select the message if skipped because its parent extension is not configured. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
495863fe69
commit
b14c93e6ca
1 changed files with 12 additions and 9 deletions
21
ext/extmk.rb
21
ext/extmk.rb
|
@ -236,6 +236,7 @@ def extmake(target)
|
|||
rescue SystemExit
|
||||
# ignore
|
||||
rescue => error
|
||||
lineno = error.backtrace_locations[0].lineno
|
||||
ok = false
|
||||
ensure
|
||||
rm_f "conftest*"
|
||||
|
@ -252,11 +253,18 @@ def extmake(target)
|
|||
|
||||
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
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue