2017-01-22 21:50:23 -05:00
|
|
|
V = 0
|
|
|
|
Q1 = $(V:1=)
|
|
|
|
Q = $(Q1:0=@)
|
|
|
|
ECHO1 = $(V:1=@:)
|
|
|
|
ECHO = $(ECHO1:0=@echo)
|
|
|
|
|
|
|
|
<%
|
2017-01-22 23:22:23 -05:00
|
|
|
srcdir = miniruby = script_args = nil
|
2017-01-22 21:50:23 -05:00
|
|
|
opt = OptionParser.new do |o|
|
|
|
|
o.on('--srcdir=SRCDIR') {|v| srcdir = v}
|
|
|
|
o.on('--miniruby=MINIRUBY') {|v| miniruby = v}
|
2017-01-22 23:22:23 -05:00
|
|
|
o.on('--script-args=MINIRUBY') {|v| script_args = v}
|
2017-01-22 21:50:23 -05:00
|
|
|
o.order!(ARGV)
|
|
|
|
end
|
|
|
|
srcdir ||= File.dirname(File.dirname(__FILE__))
|
|
|
|
exts = Dir.glob("#{srcdir}/ext/*/").map(&File.method(:basename))
|
|
|
|
%>
|
2017-01-22 23:22:23 -05:00
|
|
|
MINIRUBY = <%=miniruby%>
|
|
|
|
SCRIPT_ARGS = <%=script_args%>
|
|
|
|
|
2017-01-22 21:50:23 -05:00
|
|
|
all:
|
|
|
|
% exts.each do |dir|
|
|
|
|
all: ext/<%=dir%>/exts.mk
|
|
|
|
ext/<%=dir%>/exts.mk: FORCE
|
2017-01-22 22:51:25 -05:00
|
|
|
$(Q)$(MINIRUBY) $(srcdir)/ext/extmk.rb --make='$(MAKE)' --command-output=ext/<%=dir%>/exts.mk \
|
2017-01-22 23:22:23 -05:00
|
|
|
$(SCRIPT_ARGS) --extension=<%=dir%> --extstatic $(EXTSTATIC) \
|
2017-01-22 21:50:23 -05:00
|
|
|
--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
|
|
|
|
-- subconfigure
|
|
|
|
% end
|
|
|
|
|
|
|
|
.PHONY: FORCE
|
2017-01-22 22:43:43 -05:00
|
|
|
FORCE:
|