ruby-changes:45366
From: nobu <ko1@a...>
Date: Fri, 27 Jan 2017 16:23:25 +0900 (JST)
Subject: [ruby-changes:45366] nobu:r57439 (trunk): template/exts.mk.tmpl: consider EXEEXT
nobu 2017-01-27 16:23:21 +0900 (Fri, 27 Jan 2017) New Revision: 57439 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57439 Log: template/exts.mk.tmpl: consider EXEEXT Modified files: trunk/template/exts.mk.tmpl Index: template/exts.mk.tmpl =================================================================== --- template/exts.mk.tmpl (revision 57438) +++ template/exts.mk.tmpl (revision 57439) @@ -9,6 +9,8 @@ require './rbconfig' https://github.com/ruby/ruby/blob/trunk/template/exts.mk.tmpl#L9 macros = {} deps = [] note = [] +rubies = [] +exeext = RbConfig::CONFIG['EXEEXT'] gnumake = false opt = OptionParser.new do |o| o.on('--gnumake=BOOL') {|v| gnumake = v == 'yes'} @@ -28,8 +30,15 @@ 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$|^(?:ruby|install(?:-(?:so|rb))?|static|(?:dist|real)?clean):.+$") do + s.scan(%r"^(?:ext/\S+)/[^/\s:]+:[ \t]*\1/static$| + ^(?: + (ruby\w*#{Regexp.quote(exeext)}[^:]*)| + all|static|install(?:-(?:so|rb))?| + (?:dist|real)?clean + ):.+$ + "ox) do |r,| deps << $& + rubies |= r.split if r end s.scan(%r"^note:\n((?:\t.+\n)+)") do |(n)| note |= n.split(/^/) @@ -83,8 +92,8 @@ SUBMAKEOPTS = DLDOBJS="$(EXTOBJS) $(EXTE https://github.com/ruby/ruby/blob/trunk/template/exts.mk.tmpl#L92 EXTLDFLAGS="$(EXTLDFLAGS)" EXTINITS="$(EXTINITS)" \ UPDATE_LIBRARIES="$(UPDATE_LIBRARIES)" SHOWFLAGS= -all: ruby -static: ruby +all: +static: clean: -$(Q)$(RM) ext/extinit.<%= objext %> @@ -92,8 +101,13 @@ distclean: https://github.com/ruby/ruby/blob/trunk/template/exts.mk.tmpl#L101 -$(Q)$(RM) ext/extinit.c <%= deps.join("\n") %> -ruby: + +rubies: <%= rubies.join(' ') %> +% rubies.each do |ruby| +<%= ruby %>: $(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS) $@ +% end + libencs: $(Q)$(MAKE) -f enc.mk V=$(V) $@ ext/extinit.<%=objext%>: -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/