From 17b748df2bebc3e02abcf48c06ad73469b642779 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Jan 2017 02:50:23 +0000 Subject: Parallel ext configuration * ext/configure-ext.mk: configure each directories underneath ext in parallel. * template/exts.mk.tmpl: then collect the results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/extmk.rb') diff --git a/ext/extmk.rb b/ext/extmk.rb index 602d30826a..1f0d5bdbf6 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -421,7 +421,8 @@ if target = ARGV.shift and /^[a-z-]+$/ =~ target "INSTALL_DATA=install -c -p -m 0644", "MAKEDIRS=mkdir -p") if $dryrun when /configure/ - $configure_only = true + target = target.sub(/^sub/, '') + $configure_only = $& || true end end unless $message @@ -674,7 +675,7 @@ unless $extlist.empty? ].map {|n, v| "#{n}=#{v}" if v &&= v[/\S(?:.*\S)?/] }.compact - puts(*conf) + puts(*conf) unless $configure_only == 'sub' $stdout.flush $mflags.concat(conf) $makeflags.concat(conf) @@ -701,6 +702,7 @@ ENV.delete("RUBYOPT") if $configure_only and $command_output exts.map! {|d| "ext/#{d}/."} gems.map! {|d| "gems/#{d}/."} + FileUtils.makedirs(File.dirname($command_output)) atomic_write_open($command_output) do |mf| mf.puts "V = 0" mf.puts "Q1 = $(V:1=)" @@ -760,7 +762,7 @@ if $configure_only and $command_output mf.puts mf.puts "#{rubies.join(' ')}: $(extensions:/.=/#{$force_static ? 'static' : 'all'}) $(gems:/.=/all)" submake = "$(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS)" - mf.puts "all static: #{rubies.join(' ')}\n" + mf.puts "all static: #{rubies.join(' ')}\n" unless $configure_only == 'sub' $extobjs.each do |tgt| mf.puts "#{tgt}: #{File.dirname(tgt)}/static" end -- cgit v1.2.3