aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-10 06:12:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-10 06:12:22 +0000
commit499a1e5b3e438a4c9d4a240895cc56c41e1280d5 (patch)
tree92f64e73e7aad8ddb3beda5172c9e86ac2acd3e0 /template
parent5abfe357d2a8d3111841d2917d8ce286b47a0db9 (diff)
downloadruby-499a1e5b3e438a4c9d4a240895cc56c41e1280d5.tar.gz
MFLAGS for nmake
* common.mk (mflags): pass make flags to sub-makes, for nmake which cannot pass them by the environment variable. * defs/gmake.mk (mflags): filter out -j option for sub-makes. * template/exts.mk.tmpl (MFLAGS): extract MFLAGS from sub extmk files for nmake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/GNUmakefile.in2
-rw-r--r--template/exts.mk.tmpl16
2 files changed, 10 insertions, 8 deletions
diff --git a/template/GNUmakefile.in b/template/GNUmakefile.in
index 9cbed68e20..c904d3474e 100644
--- a/template/GNUmakefile.in
+++ b/template/GNUmakefile.in
@@ -1,5 +1,3 @@
-#override MFLAGS := $(filter-out -j%,$(MFLAGS))
-#override MAKEFLAGS := $(filter-out -j%,$(MAKEFLAGS))
include Makefile
-include uncommon.mk
include $(srcdir)/defs/gmake.mk
diff --git a/template/exts.mk.tmpl b/template/exts.mk.tmpl
index bf110c5c94..e4633c415a 100644
--- a/template/exts.mk.tmpl
+++ b/template/exts.mk.tmpl
@@ -19,7 +19,7 @@ end
Dir.glob("{ext,gems}/*/exts.mk") do |e|
gem = /\Agems(?=\/)/ =~ e
s = File.read(e)
- s.scan(/^(extensions|EXT[A-Z]+)[ \t]*=[ \t]*((?>(?>[^\\\n]|\\.)*\\\n)*(?>[^\\\n]|\\.)*)$/) do |n, v|
+ s.scan(/^(extensions|EXT[A-Z]+|MFLAGS)[ \t]*=[ \t]*((?>(?>[^\\\n]|\\.)*\\\n)*(?>[^\\\n]|\\.)*)$/) do |n, v|
v.gsub!(/\\\n[ \t]*/, ' ')
next if v.empty?
next if gem and n != "extensions"
@@ -85,8 +85,12 @@ else
submake = "cd $(@D) && "
exec = RbConfig::CONFIG["exec"] and !exec.empty? and submake << exec << " "
submake << "$(MAKE)"
+ mflags = " $(MFLAGS)"
end
-%>
+-%>
+% unless macros["MFLAGS"].empty?
+MFLAGS =<%= macros["MFLAGS"].fold(column) %>
+% end
extensions =<%= macros["extensions"].fold(column) %>
EXTOBJS =<%= macros["EXTOBJS"].fold(column) %>
@@ -111,17 +115,17 @@ distclean:
% rubies.each do |ruby|
<%= ruby %>:
- $(Q)$(MAKE) $(SUBMAKEOPTS) $@
+ $(Q)$(MAKE)<%=mflags%> $(SUBMAKEOPTS) $@
% end
libencs:
- $(Q)$(MAKE) -f enc.mk V=$(V) $@
+ $(Q)$(MAKE)<%=mflags%> -f enc.mk V=$(V) $@
ext/extinit.<%=objext%>:
- $(Q)$(MAKE) V=$(V) EXTINITS="$(EXTINITS)" $@
+ $(Q)$(MAKE)<%=mflags%> V=$(V) EXTINITS="$(EXTINITS)" $@
% targets.product(macros["extensions"].map {|e|e.chomp("/.")}) do |t, e|
<%=e%>/<%=t%>:
- $(Q)<%= submake %> V=$(V) $(@F)
+ $(Q)<%= submake %><%=mflags%> V=$(V) $(@F)
% end
extso: