зеркало из https://github.com/github/ruby.git
exts.mk.tmpl: for not GNU makes
* template/exts.mk.tmpl: use `cd` then `make` instead of `make -C` when not GNU make. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
640bcdf217
Коммит
df05027c2d
|
@ -215,7 +215,7 @@ $(EXTS_MK): ext/configure-ext.mk $(TIMESTAMPDIR)/.$(arch).time $(srcdir)/templat
|
|||
gnumake=$(gnumake) EXTLDFLAGS="$(EXTLDFLAGS)" srcdir="$(srcdir)"
|
||||
$(ECHO) generating makefile $@
|
||||
$(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
|
||||
$(srcdir)/template/exts.mk.tmpl
|
||||
$(srcdir)/template/exts.mk.tmpl --gnumake=$(gnumake)
|
||||
|
||||
ext/configure-ext.mk: $(PREP) all-incs $(MKFILES) $(RBCONFIG) $(LIBRUBY)
|
||||
$(ECHO) generating makefiles $@
|
||||
|
|
|
@ -9,6 +9,11 @@ require './rbconfig'
|
|||
macros = {}
|
||||
deps = []
|
||||
note = []
|
||||
gnumake = false
|
||||
opt = OptionParser.new do |o|
|
||||
o.on('--gnumake=BOOL') {|v| gnumake = v == 'yes'}
|
||||
o.order!(ARGV)
|
||||
end
|
||||
Dir.glob("ext/*/exts.mk") do |e|
|
||||
s = File.read(e)
|
||||
s.scan(/^(extensions|EXT[A-Z]+)[ \t]*=[ \t]*((?>(?>[^\\\n]|\\.)*\\\n)*(?>[^\\\n]|\\.)*)$/) do |n, v|
|
||||
|
@ -57,6 +62,13 @@ def self.column
|
|||
end
|
||||
targets = %w[all static install install-so install-rb clean distclean realclean]
|
||||
objext = RbConfig::CONFIG["OBJEXT"]
|
||||
if gnumake
|
||||
submake = "$(MAKE) -C $(@D)"
|
||||
else
|
||||
submake = "cd $(@D) && "
|
||||
exec = RbConfig::CONFIG["exec"] and !exec.empty? and submake << str << " "
|
||||
submake << "$(MAKE)"
|
||||
end
|
||||
%>
|
||||
|
||||
extensions =<%= macros["extensions"].fold(column) %>
|
||||
|
@ -89,7 +101,7 @@ ext/extinit.<%=objext%>:
|
|||
|
||||
% targets.product(macros["extensions"].map {|e|e.chomp("/.")}) do |t, e|
|
||||
<%=e%>/<%=t%>:
|
||||
$(Q)$(MAKE) -C $(@D) $(MFLAGS) V=$(V) $(@F)
|
||||
$(Q)<%= submake %> $(MFLAGS) $(SUBMAKEOPTS) V=$(V) $(@F)
|
||||
% end
|
||||
|
||||
extso:
|
||||
|
|
Загрузка…
Ссылка в новой задаче