ruby-changes:45371
From: nobu <ko1@a...>
Date: Sat, 28 Jan 2017 10:43:51 +0900 (JST)
Subject: [ruby-changes:45371] nobu:r57444 (trunk): exts.mk.tmpl: ruby names
nobu 2017-01-28 10:43:29 +0900 (Sat, 28 Jan 2017) New Revision: 57444 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57444 Log: exts.mk.tmpl: ruby names * template/exts.mk.tmpl: extract configured ruby names. Modified files: trunk/ext/extmk.rb trunk/template/exts.mk.tmpl Index: template/exts.mk.tmpl =================================================================== --- template/exts.mk.tmpl (revision 57443) +++ template/exts.mk.tmpl (revision 57444) @@ -30,15 +30,17 @@ Dir.glob("ext/*/exts.mk") do |e| https://github.com/ruby/ruby/blob/trunk/template/exts.mk.tmpl#L30 macros[n] = m | v end end - s.scan(%r"^(?:ext/\S+)/[^/\s:]+:[ \t]*\1/static$| + r = s[/^all static: (.+)$/, 1] + deps << $& + rubies |= r.split if r + s.scan(%r"^(ext/\S+)/[^/\s:]+:[ \t]*\1/static$| ^(?: - (ruby\w*#{Regexp.quote(exeext)}[^:]*)| + (?:#{Regexp.new(r)})| all|static|install(?:-(?:so|rb))?| (?:dist|real)?clean ):.+$ - "ox) do |r,| + "x) do deps << $& - rubies |= r.split if r end s.scan(%r"^note:\n((?:\t.+\n)+)") do |(n)| note |= n.split(/^/) @@ -92,8 +94,8 @@ SUBMAKEOPTS = DLDOBJS="$(EXTOBJS) $(EXTE https://github.com/ruby/ruby/blob/trunk/template/exts.mk.tmpl#L94 EXTLDFLAGS="$(EXTLDFLAGS)" EXTINITS="$(EXTINITS)" \ UPDATE_LIBRARIES="$(UPDATE_LIBRARIES)" SHOWFLAGS= -all: rubies -static: rubies +all: +static: clean: -$(Q)$(RM) ext/extinit.<%= objext %> @@ -102,7 +104,6 @@ distclean: https://github.com/ruby/ruby/blob/trunk/template/exts.mk.tmpl#L104 <%= deps.join("\n") %> -rubies: <%= rubies.join(' ') %> % rubies.each do |ruby| <%= ruby %>: $(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS) $@ Index: ext/extmk.rb =================================================================== --- ext/extmk.rb (revision 57443) +++ ext/extmk.rb (revision 57444) @@ -741,7 +741,7 @@ if $configure_only and $command_output https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L741 mf.puts mf.puts "#{rubies.join(' ')}: $(extensions:/.=/#{$force_static ? 'static' : 'all'})" submake = "$(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS)" - mf.puts "all static: #{rubies.join(' ')}\n" unless $configure_only == 'sub' + mf.puts "all static: #{rubies.join(' ')}\n" $extobjs.each do |tgt| mf.puts "#{tgt}: #{File.dirname(tgt)}/static" end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/