1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/template/configure-ext.mk.tmpl
nobu 48d489030a 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
2017-01-23 04:22:23 +00:00

32 lines
828 B
Cheetah

V = 0
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO1 = $(V:1=@:)
ECHO = $(ECHO1:0=@echo)
<%
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 \
$(SCRIPT_ARGS) --extension=<%=dir%> --extstatic $(EXTSTATIC) \
--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
-- subconfigure
% end
.PHONY: FORCE
FORCE: