mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
3be16b24f3
* template/configure-ext.mk.tmpl: fixed inverted names of target and directory, and chomp the last slash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
41 lines
974 B
Cheetah
41 lines
974 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 = {}
|
|
[["exts", "ext"], ["gems", "gems"]].each do |t, dir|
|
|
exts[t] = Dir.glob("#{srcdir}/#{dir}/*/").map {|n| n[(srcdir.size+1)..-2]}
|
|
end
|
|
%>
|
|
MINIRUBY = <%=miniruby%>
|
|
SCRIPT_ARGS = <%=script_args%>
|
|
EXTMK_ARGS = $(SCRIPT_ARGS) --extstatic $(EXTSTATIC) \
|
|
--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
|
|
|
|
all: exts gems
|
|
exts:
|
|
gems:
|
|
|
|
% exts.each do |t, dirs|
|
|
% dirs.each do |dir|
|
|
<%=t%>: <%=dir%>/exts.mk
|
|
<%=dir%>/exts.mk: FORCE
|
|
$(Q)$(MINIRUBY) $(srcdir)/ext/extmk.rb --make='$(MAKE)' \
|
|
--command-output=$@ $(EXTMK_ARGS) \
|
|
-- subconfigure $(@D)
|
|
% end
|
|
% end
|
|
|
|
.PHONY: FORCE all exts gems
|
|
FORCE:
|