diff options
-rwxr-xr-x | ext/extmk.rb | 2 | ||||
-rw-r--r-- | template/exts.mk.tmpl | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb index 8e64045996..bf6b9d9d8e 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -741,7 +741,7 @@ if $configure_only and $command_output 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 diff --git a/template/exts.mk.tmpl b/template/exts.mk.tmpl index a9a9ea09d1..222cf2f001 100644 --- a/template/exts.mk.tmpl +++ b/template/exts.mk.tmpl @@ -30,15 +30,17 @@ Dir.glob("ext/*/exts.mk") do |e| 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) $(EXTENCS)" EXTOBJS= \ 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: <%= deps.join("\n") %> -rubies: <%= rubies.join(' ') %> % rubies.each do |ruby| <%= ruby %>: $(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS) $@ |