ruby-changes:40356
From: nobu <ko1@a...>
Date: Wed, 4 Nov 2015 10:31:25 +0900 (JST)
Subject: [ruby-changes:40356] nobu:r52437 (trunk): mkmf.rb: revert r52431
nobu 2015-11-04 10:31:09 +0900 (Wed, 04 Nov 2015) New Revision: 52437 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52437 Log: mkmf.rb: revert r52431 * lib/mkmf.rb: it's an issue of test/mkmf. Modified files: trunk/lib/mkmf.rb Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 52436) +++ lib/mkmf.rb (revision 52437) @@ -382,9 +382,7 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L382 nil while command.gsub!(varpat) {vars[$1||$2]} end Logging::open do - msg = command.quote - puts msg - Logging.message "%s\n", msg + puts command.quote if opts and opts[:werror] result = nil Logging.postpone do |log| @@ -401,15 +399,11 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L399 def xpopen command, *mode, &block Logging::open do - msg = case mode[0] + case mode[0] when nil, /^r/ - "#{command} |" + puts "#{command} |" else - "| #{command}" - end - if msg - puts msg - Logging.message "%s\n", msg + puts "| #{command}" end IO.popen(libpath_env, command, *mode, &block) end @@ -814,16 +808,13 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L808 xpopen(cpp_command('', opt)) do |f| if Regexp === pat puts(" ruby -ne 'print if #{pat.inspect}'") - Logging::message(" ruby -ne 'print if %p'\n", pat) f.grep(pat) {|l| puts "#{f.lineno}: #{l}" - Logging::message "%d: %s", f.lineno, l return true } false else puts(" egrep '#{pat}'") - Logging::message(" egrep '%s'\n", pat) begin stdin = $stdin.dup $stdin.reopen(f) @@ -1801,7 +1792,7 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1792 pkgconfig = $PKGCONFIG get = proc {|opt| opt = xpopen("#{$PKGCONFIG} --#{opt} #{pkg}", err:[:child, :out], &:read) - Logging.open {opt.each_line.map{|s|Logging.message "=> %p\n", s}} + Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}} opt.strip if $?.success? } elsif find_executable0(pkgconfig = "#{pkg}-config") @@ -1812,7 +1803,7 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1803 if pkgconfig get ||= proc {|opt| opt = xpopen("#{pkgconfig} --#{opt}", err:[:child, :out], &:read) - Logging.open {opt.each_line.map{|s|Logging.message "=> %p\n", s}} + Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}} opt.strip if $?.success? } end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/