summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-15 23:27:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-15 23:27:12 +0000
commit7d193ca3144ef1a92d8d5e3c0330ff8719fd54ac (patch)
tree4398f62ece0833719e2d67472cb6582b324d25c8 /ext
parentd9fd1808495f5983ddbc53c33ac6416e987de8f1 (diff)
* ext/extmk.rb: skip linking when libraries to be preloaded not
compiled. [ruby-list:39561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 0c42b79600..ec7ae32343 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -233,10 +233,13 @@ if $extlist.size > 0
$extinit ||= ""
$extobjs ||= ""
list = $extlist.dup
- until list.empty?
- s,t,i,r = list.shift
- if r and list.any? {|l| r.include?(l[1])}
- list << [s,t,i]
+ while e = list.shift
+ s,t,i,r = e
+ if r and !r.empty?
+ l = list.size
+ if (while l > 0; break true if r.include?(list[l-=1][1]) end)
+ list.insert(l + 1, e)
+ end
next
end
f = format("%s/%s.%s", s, i, $LIBEXT)