summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-23 02:50:23 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-23 02:50:23 (GMT)
commit17b748df2bebc3e02abcf48c06ad73469b642779 (patch)
treeab182f369cdbe4fa47dcb8cd3cc5602445c15c69 /ext/extmk.rb
parentee9f6fdfada57679e2a434ce2f438a6bda20a5ad (diff)
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
Diffstat (limited to 'ext/extmk.rb')
-rwxr-xr-xext/extmk.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 602d308..1f0d5bd 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