mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure-ext.mk.tmpl: embed macros
* template/configure-ext.mk.tmpl: embed MINIRUBY and SCRIPT_ARGS to get rid of quoting problems of nmake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f41b7517dc
commit
48d489030a
2 changed files with 9 additions and 5 deletions
|
@ -211,8 +211,7 @@ exts: build-ext
|
||||||
|
|
||||||
EXTS_MK = exts.mk
|
EXTS_MK = exts.mk
|
||||||
$(EXTS_MK): ext/configure-ext.mk $(TIMESTAMPDIR)/.$(arch).time $(srcdir)/template/exts.mk.tmpl
|
$(EXTS_MK): ext/configure-ext.mk $(TIMESTAMPDIR)/.$(arch).time $(srcdir)/template/exts.mk.tmpl
|
||||||
$(MAKE) -f ext/configure-ext.mk V=$(V) MINIRUBY="$(MINIRUBY)" \
|
$(MAKE) -f ext/configure-ext.mk V=$(V) EXTSTATIC=$(EXTSTATIC) \
|
||||||
EXTSTATIC=$(EXTSTATIC) \
|
|
||||||
gnumake=$(gnumake) EXTLDFLAGS="$(EXTLDFLAGS)" srcdir="$(srcdir)"
|
gnumake=$(gnumake) EXTLDFLAGS="$(EXTLDFLAGS)" srcdir="$(srcdir)"
|
||||||
$(ECHO) generating makefile $@
|
$(ECHO) generating makefile $@
|
||||||
$(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
|
$(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
|
||||||
|
@ -222,7 +221,8 @@ ext/configure-ext.mk: $(PREP) all-incs $(MKFILES) $(RBCONFIG) $(LIBRUBY)
|
||||||
$(ECHO) generating makefiles $@
|
$(ECHO) generating makefiles $@
|
||||||
$(Q)$(MAKEDIRS) ext
|
$(Q)$(MAKEDIRS) ext
|
||||||
$(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
|
$(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)
|
configure-ext: $(EXTS_MK)
|
||||||
|
|
||||||
|
|
|
@ -5,21 +5,25 @@ ECHO1 = $(V:1=@:)
|
||||||
ECHO = $(ECHO1:0=@echo)
|
ECHO = $(ECHO1:0=@echo)
|
||||||
|
|
||||||
<%
|
<%
|
||||||
srcdir = miniruby = nil
|
srcdir = miniruby = script_args = nil
|
||||||
opt = OptionParser.new do |o|
|
opt = OptionParser.new do |o|
|
||||||
o.on('--srcdir=SRCDIR') {|v| srcdir = v}
|
o.on('--srcdir=SRCDIR') {|v| srcdir = v}
|
||||||
o.on('--miniruby=MINIRUBY') {|v| miniruby = v}
|
o.on('--miniruby=MINIRUBY') {|v| miniruby = v}
|
||||||
|
o.on('--script-args=MINIRUBY') {|v| script_args = v}
|
||||||
o.order!(ARGV)
|
o.order!(ARGV)
|
||||||
end
|
end
|
||||||
srcdir ||= File.dirname(File.dirname(__FILE__))
|
srcdir ||= File.dirname(File.dirname(__FILE__))
|
||||||
exts = Dir.glob("#{srcdir}/ext/*/").map(&File.method(:basename))
|
exts = Dir.glob("#{srcdir}/ext/*/").map(&File.method(:basename))
|
||||||
%>
|
%>
|
||||||
|
MINIRUBY = <%=miniruby%>
|
||||||
|
SCRIPT_ARGS = <%=script_args%>
|
||||||
|
|
||||||
all:
|
all:
|
||||||
% exts.each do |dir|
|
% exts.each do |dir|
|
||||||
all: ext/<%=dir%>/exts.mk
|
all: ext/<%=dir%>/exts.mk
|
||||||
ext/<%=dir%>/exts.mk: FORCE
|
ext/<%=dir%>/exts.mk: FORCE
|
||||||
$(Q)$(MINIRUBY) $(srcdir)/ext/extmk.rb --make='$(MAKE)' --command-output=ext/<%=dir%>/exts.mk \
|
$(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)" \
|
--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
|
||||||
-- subconfigure
|
-- subconfigure
|
||||||
% end
|
% end
|
||||||
|
|
Loading…
Reference in a new issue