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