diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 06:12:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 06:12:22 +0000 |
commit | 92b710e64bf194266e3354c06fdb16dc7de0196d (patch) | |
tree | 92f64e73e7aad8ddb3beda5172c9e86ac2acd3e0 /template | |
parent | 35533d0346ed5965665ad3c097d7819218bb48fb (diff) | |
download | ruby-92b710e64bf194266e3354c06fdb16dc7de0196d.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.in | 2 | ||||
-rw-r--r-- | template/exts.mk.tmpl | 16 |
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: |