From 9550714057bf9f2b1455bbdcd53fe6623ef48524 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 --- template/configure-ext.mk.tmpl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 template/configure-ext.mk.tmpl (limited to 'template/configure-ext.mk.tmpl') diff --git a/template/configure-ext.mk.tmpl b/template/configure-ext.mk.tmpl new file mode 100644 index 0000000000..974a257e2e --- /dev/null +++ b/template/configure-ext.mk.tmpl @@ -0,0 +1,27 @@ +V = 0 +Q1 = $(V:1=) +Q = $(Q1:0=@) +ECHO1 = $(V:1=@:) +ECHO = $(ECHO1:0=@echo) + +<% +srcdir = miniruby = nil +opt = OptionParser.new do |o| + o.on('--srcdir=SRCDIR') {|v| srcdir = v} + o.on('--miniruby=MINIRUBY') {|v| miniruby = v} + o.order!(ARGV) +end +srcdir ||= File.dirname(File.dirname(__FILE__)) +exts = Dir.glob("#{srcdir}/ext/*/").map(&File.method(:basename)) +%> +all: +% exts.each do |dir| +all: ext/<%=dir%>/exts.mk +ext/<%=dir%>/exts.mk: FORCE + $(Q)$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --command-output=ext/<%=dir%>/exts.mk \ + $(SCRIPT_ARGS) --extension=<%=dir%> --extstatic $(EXTSTATIC) \ + --gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \ + -- subconfigure +% end + +.PHONY: FORCE -- cgit v1.2.3