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
|
rescue SystemExit
|
||||||
# ignore
|
# ignore
|
||||||
rescue => error
|
rescue => error
|
||||||
|
lineno = error.backtrace_locations[0].lineno
|
||||||
ok = false
|
ok = false
|
||||||
ensure
|
ensure
|
||||||
rm_f "conftest*"
|
rm_f "conftest*"
|
||||||
|
@ -252,11 +253,18 @@ def extmake(target)
|
||||||
|
|
||||||
return true if !error and target.start_with?("-")
|
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?
|
if Logging.log_opened?
|
||||||
Logging::message(error.to_s) if error
|
Logging::message(error.to_s) if error
|
||||||
Logging::message("Failed to configure #{target}. It will not be installed.\n")
|
Logging::message(message)
|
||||||
end
|
end
|
||||||
return [conf, error]
|
message = error.message if error
|
||||||
|
|
||||||
|
return parent ? [conf, lineno||0, message] : true
|
||||||
end
|
end
|
||||||
args = sysquote($mflags)
|
args = sysquote($mflags)
|
||||||
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
|
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
|
||||||
|
@ -744,15 +752,10 @@ if $configure_only and $command_output
|
||||||
mf.puts "\n""note:\n"
|
mf.puts "\n""note:\n"
|
||||||
unless fails.empty?
|
unless fails.empty?
|
||||||
mf.puts %Q<\t@echo "*** Following extensions failed to configure:">
|
mf.puts %Q<\t@echo "*** Following extensions failed to configure:">
|
||||||
fails.each do |d, e|
|
fails.each do |d, n, e|
|
||||||
if e && e.respond_to?(:backtrace_locations)
|
|
||||||
n = e.backtrace_locations[0].lineno
|
|
||||||
else
|
|
||||||
n = 0
|
|
||||||
end
|
|
||||||
d = "#{d}:#{n}:"
|
d = "#{d}:#{n}:"
|
||||||
if e
|
if e
|
||||||
d << " " << e.message
|
d << " " << e
|
||||||
end
|
end
|
||||||
mf.puts %Q<\t@echo "#{d}">
|
mf.puts %Q<\t@echo "#{d}">
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue