ruby-changes:42909
From: nobu <ko1@a...>
Date: Thu, 12 May 2016 20:19:50 +0900 (JST)
Subject: [ruby-changes:42909] nobu:r54983 (trunk): extmk.rb: failed messages at the end
nobu 2016-05-12 20:19:43 +0900 (Thu, 12 May 2016) New Revision: 54983 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54983 Log: extmk.rb: failed messages at the end * ext/extmk.rb: output failed configurations at the end, not to be scrolled out. TODO: show the message at the end of the whole build. Modified files: trunk/ext/extmk.rb Index: ext/extmk.rb =================================================================== --- ext/extmk.rb (revision 54982) +++ ext/extmk.rb (revision 54983) @@ -252,15 +252,11 @@ def extmake(target) https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L252 return true if !error and target.start_with?("-") - mess = "Failed to configure #{target}. It will not be installed.\n" - if error - mess = "#{error}\n#{mess}" + if Logging.log_opened? + Logging::message(error.to_s) if error + Logging::message("Failed to configure #{target}. It will not be installed.\n") end - - Logging::message(mess) if Logging.log_opened? - print(mess) - $stdout.flush - return true + return [target, error] end args = sysquote($mflags) unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR") @@ -544,11 +540,13 @@ Dir::chdir('ext') https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L540 hdrdir = $hdrdir $hdrdir = ($top_srcdir = relative_from(srcdir, $topdir = "..")) + "/include" +fails = [] exts.each do |d| $static = $force_static ? true : $static_ext[d] if $ignore or !$nodynamic or $static - extmake(d) or abort + result = extmake(d) or abort + fails << result unless result == true end end @@ -713,6 +711,7 @@ if $configure_only and $command_output https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L711 targets = %w[all install static install-so install-rb clean distclean realclean] targets.each do |tgt| mf.puts "#{tgt}: $(extensions:/.=/#{tgt})" + mf.puts "#{tgt}: note" unless /clean\z/ =~ tgt end mf.puts mf.puts "clean:\n\t-$(Q)$(RM) ext/extinit.#{$OBJEXT}" @@ -742,6 +741,15 @@ if $configure_only and $command_output https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L741 mf.puts "#{d[0..-2]}#{tgt}:\n\t$(Q)#{submake} $(MFLAGS) V=$(V) $(@F)" end end + mf.puts "\n""note:\n" + 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})}"> + end + mf.puts %Q<\t@echo "*** Fix the problems, then remove these directories and try again if you want."> + end + end elsif $command_output message = "making #{rubies.join(', ')}" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/