[前][次][番号順一覧][スレッド一覧]

ruby-changes:45331

From: nobu <ko1@a...>
Date: Mon, 23 Jan 2017 13:22:28 +0900 (JST)
Subject: [ruby-changes:45331] nobu:r57404 (trunk): configure-ext.mk.tmpl: embed macros

nobu	2017-01-23 13:22:23 +0900 (Mon, 23 Jan 2017)

  New Revision: 57404

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57404

  Log:
    configure-ext.mk.tmpl: embed macros
    
    * template/configure-ext.mk.tmpl: embed MINIRUBY and SCRIPT_ARGS
      to get rid of quoting problems of nmake.

  Modified files:
    trunk/common.mk
    trunk/template/configure-ext.mk.tmpl
Index: template/configure-ext.mk.tmpl
===================================================================
--- template/configure-ext.mk.tmpl	(revision 57403)
+++ template/configure-ext.mk.tmpl	(revision 57404)
@@ -5,21 +5,25 @@ ECHO1 = $(V:1=@:) https://github.com/ruby/ruby/blob/trunk/template/configure-ext.mk.tmpl#L5
 ECHO = $(ECHO1:0=@echo)
 
 <%
-srcdir = miniruby = nil
+srcdir = miniruby = script_args = nil
 opt = OptionParser.new do |o|
   o.on('--srcdir=SRCDIR') {|v| srcdir = v}
   o.on('--miniruby=MINIRUBY') {|v| miniruby = v}
+  o.on('--script-args=MINIRUBY') {|v| script_args = v}
   o.order!(ARGV)
 end
 srcdir ||= File.dirname(File.dirname(__FILE__))
 exts = Dir.glob("#{srcdir}/ext/*/").map(&File.method(:basename))
 %>
+MINIRUBY = <%=miniruby%>
+SCRIPT_ARGS = <%=script_args%>
+
 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 \
-		--extension=<%=dir%> --extstatic $(EXTSTATIC) \
+		$(SCRIPT_ARGS) --extension=<%=dir%> --extstatic $(EXTSTATIC) \
 		--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
 		-- subconfigure
 % end
Index: common.mk
===================================================================
--- common.mk	(revision 57403)
+++ common.mk	(revision 57404)
@@ -211,8 +211,7 @@ exts: build-ext https://github.com/ruby/ruby/blob/trunk/common.mk#L211
 
 EXTS_MK = exts.mk
 $(EXTS_MK): ext/configure-ext.mk $(TIMESTAMPDIR)/.$(arch).time $(srcdir)/template/exts.mk.tmpl
-	$(MAKE) -f ext/configure-ext.mk V=$(V) MINIRUBY="$(MINIRUBY)" \
-		EXTSTATIC=$(EXTSTATIC) \
+	$(MAKE) -f ext/configure-ext.mk V=$(V) EXTSTATIC=$(EXTSTATIC) \
 		gnumake=$(gnumake) EXTLDFLAGS="$(EXTLDFLAGS)" srcdir="$(srcdir)"
 	$(ECHO) generating makefile $@
 	$(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
@@ -222,7 +221,8 @@ ext/configure-ext.mk: $(PREP) all-incs $ https://github.com/ruby/ruby/blob/trunk/common.mk#L221
 	$(ECHO) generating makefiles $@
 	$(Q)$(MAKEDIRS) ext
 	$(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
-	    $(srcdir)/template/$(@F).tmpl --srcdir="$(srcdir)"
+	    $(srcdir)/template/$(@F).tmpl --srcdir="$(srcdir)" \
+	    --miniruby="$(MINIRUBY)" --script-args='$(SCRIPT_ARGS)'
 
 configure-ext: $(EXTS_MK)
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]