aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-16 00:16:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-16 00:16:13 +0000
commit38bd293b267c3e457c137dc75b100bd7a7d14d46 (patch)
tree4e14122210162779275a813d84669d38163b92e6
parent98990d16615cd086aa623077ed1e76b8c9b4a536 (diff)
downloadruby-38bd293b267c3e457c137dc75b100bd7a7d14d46.tar.gz
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
-rwxr-xr-xext/extmk.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 53d86b6..220c55e 100755
--- a/ext/extmk.rb
+++ b/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