1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/extmk.rb (extmake): extact target prefix from Makefiles.

* ext/extmk.rb: already built-in libraries satisfy dependencies.
  [ruby-dev:24028]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-09-02 16:54:35 +00:00
parent 1e1054f3d8
commit a7ec244cc7
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Fri Sep 3 01:54:20 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (extmake): extact target prefix from Makefiles.
* ext/extmk.rb: already built-in libraries satisfy dependencies.
[ruby-dev:24028]
Wed Sep 1 21:16:50 2004 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* ext/tk/lib/tk/spinbox.rb: fix typo

View file

@ -103,7 +103,11 @@ def extmake(target)
else
if $static
m = File.read(makefile)
$target = m[/^TARGET[ \s]*=[ \s]*(\S*)/, 1] or $static = nil
if !($target = m[/^TARGET[ \t]*=[ \t]*(\S*)/, 1])
$static = nil
elsif target_prefix = m[/^target_prefix[ \t]*=[ \t]*\/(.*)/, 1]
$target = "#{target_prefix}/#{$target}"
end
/^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
$DLDFLAGS += " " + (m[/^DLDFLAGS[ \t]*=[ \t]*(.*)/, 1] || "")
@ -353,9 +357,10 @@ if $extlist.size > 0
$extinit ||= ""
$extobjs ||= ""
list = $extlist.dup
built = []
while e = list.shift
s,t,i,r = e
if r and !r.empty?
if r and !(r -= built).empty?
l = list.size
if (while l > 0; break true if r.include?(list[l-=1][1]) end)
list.insert(l + 1, e)
@ -366,6 +371,7 @@ if $extlist.size > 0
if File.exist?(f)
$extinit += "\tinit(Init_#{i}, \"#{t}.so\");\n"
$extobjs += "ext/#{f} "
built << t
end
end