summaryrefslogtreecommitdiff
path: root/template/exts.mk.tmpl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-28 05:02:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-28 05:02:41 +0000
commitcc33dd2b675f4ce8e9dd96498d4da9b1725cd2b7 (patch)
treefcb7e6467b2c4735589925a04057ce49841b2ba7 /template/exts.mk.tmpl
parentb3dbeb6e90f316584f70e33f6bfb9d83fa5f30d3 (diff)
downloadbundler-cc33dd2b675f4ce8e9dd96498d4da9b1725cd2b7.tar.gz
extension gems in static-linked-exts
* template/configure-ext.mk.tmpl: --no-extstatic option to gems. * template/exts.mk.tmpl: include extension gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template/exts.mk.tmpl')
-rw-r--r--template/exts.mk.tmpl21
1 files changed, 13 insertions, 8 deletions
diff --git a/template/exts.mk.tmpl b/template/exts.mk.tmpl
index 222cf2f001..6215e5da0e 100644
--- a/template/exts.mk.tmpl
+++ b/template/exts.mk.tmpl
@@ -16,11 +16,13 @@ opt = OptionParser.new do |o|
o.on('--gnumake=BOOL') {|v| gnumake = v == 'yes'}
o.order!(ARGV)
end
-Dir.glob("ext/*/exts.mk") do |e|
+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|
v.gsub!(/\\\n[ \t]*/, ' ')
next if v.empty?
+ next if gem and n != "extensions"
v = v.split
m = macros[n] ||= []
case n
@@ -30,12 +32,16 @@ Dir.glob("ext/*/exts.mk") do |e|
macros[n] = m | v
end
end
- r = s[/^all static: (.+)$/, 1]
- deps << $&
- rubies |= r.split if r
+ if gem
+ r = ""
+ else
+ r = s[/^all static: (.+)$/, 1]
+ deps << $&
+ rubies |= r.split if r
+ r = "(?:#{Regexp.new(r)})|"
+ end
s.scan(%r"^(ext/\S+)/[^/\s:]+:[ \t]*\1/static$|
- ^(?:
- (?:#{Regexp.new(r)})|
+ ^(?:#{r}
all|static|install(?:-(?:so|rb))?|
(?:dist|real)?clean
):.+$
@@ -83,7 +89,6 @@ end
%>
extensions =<%= macros["extensions"].fold(column) %>
-gems =
EXTOBJS =<%= macros["EXTOBJS"].fold(column) %>
EXTLIBS =<%= macros["EXTLIBS"].fold(column) %>
EXTSO =<%= macros["EXTSO"].fold(column) %>
@@ -116,7 +121,7 @@ ext/extinit.<%=objext%>:
% targets.product(macros["extensions"].map {|e|e.chomp("/.")}) do |t, e|
<%=e%>/<%=t%>:
- $(Q)<%= submake %> $(MFLAGS) $(SUBMAKEOPTS) V=$(V) $(@F)
+ $(Q)<%= submake %> $(MFLAGS) V=$(V) $(@F)
% end
extso: