summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-07 22:06:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-07 22:06:38 +0000
commit44e22e8d78e874ee3651b8987ecd9556740b2da6 (patch)
tree98854c6bf127f7f213ddeff4860ef4d4d2028242
parent250cfdc0aae92fe4c69ed9afbd06d03360ec40b6 (diff)
* ext/extmk.rb: preserve order in Setup. [ruby-dev:22503]
* ext/extmk.rb: move dependent libraries just after depended libraries. * ext/digest/*/extconf.rb: depend on digest. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--ext/digest/md5/extconf.rb2
-rw-r--r--ext/digest/rmd160/extconf.rb2
-rw-r--r--ext/digest/sha1/extconf.rb2
-rw-r--r--ext/digest/sha2/extconf.rb2
-rw-r--r--ext/extmk.rb22
6 files changed, 32 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 5423947..92434dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Thu Jan 8 07:06:30 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb: preserve order in Setup. [ruby-dev:22503]
+
+ * ext/extmk.rb: move dependent libraries just after depended
+ libraries.
+
+ * ext/digest/*/extconf.rb: depend on digest.
+
Thu Jan 8 04:36:17 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
* lib/webrick/cgi.rb (WEBrick::CGI#initialize): should create
diff --git a/ext/digest/md5/extconf.rb b/ext/digest/md5/extconf.rb
index 0db0404..4ab7b40 100644
--- a/ext/digest/md5/extconf.rb
+++ b/ext/digest/md5/extconf.rb
@@ -24,4 +24,6 @@ have_header("inttypes.h")
have_header("unistd.h")
+$preload = %w[digest]
+
create_makefile("digest/md5")
diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb
index 3f6a88e..e6edf5a 100644
--- a/ext/digest/rmd160/extconf.rb
+++ b/ext/digest/rmd160/extconf.rb
@@ -23,4 +23,6 @@ have_header("inttypes.h")
have_header("unistd.h")
+$preload = %w[digest]
+
create_makefile("digest/rmd160")
diff --git a/ext/digest/sha1/extconf.rb b/ext/digest/sha1/extconf.rb
index c249a41..4d8ba64 100644
--- a/ext/digest/sha1/extconf.rb
+++ b/ext/digest/sha1/extconf.rb
@@ -22,4 +22,6 @@ have_header("inttypes.h")
have_header("unistd.h")
+$preload = %w[digest]
+
create_makefile("digest/sha1")
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb
index c982aa6..53698a7 100644
--- a/ext/digest/sha2/extconf.rb
+++ b/ext/digest/sha2/extconf.rb
@@ -17,6 +17,8 @@ have_header("inttypes.h")
have_header("unistd.h")
+$preload = %w[digest]
+
if try_cpp(<<SRC, $defs.join(' '))
#include "defs.h"
#ifdef NO_UINT64_T
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 4f2ab88..21d82ff 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -205,7 +205,7 @@ for dir in ["ext", File::join($top_srcdir, "ext")]
next
end
target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
- $static_ext[target] = true
+ $static_ext[target] = $static_ext.size
end
MTIMES << f.mtime
$setup = setup
@@ -218,10 +218,15 @@ FileUtils::makedirs('ext')
Dir::chdir('ext')
ext_prefix = "#{$top_srcdir}/ext"
+$static_ext.sort_by {|t, i| i}.each do |t, i|
+ next unless File.exist?("#{ext_prefix}/#{t}/MANIFEST")
+ extmake(t) or abort
+end
Dir.glob("#{ext_prefix}/*/**/MANIFEST") do |d|
d = File.dirname(d)
d.slice!(0, ext_prefix.length + 1)
- extmake(d) or exit(1)
+ next if $static_ext[d]
+ extmake(d) or abort
end
if $ignore
@@ -233,11 +238,14 @@ 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]
- next
+ while e = list.shift
+ s,t,i,r = e
+ if r
+ l = list.size
+ if (while l > 0; break true if r.include?(list[l-=1][1]) end)
+ list.insert(l + 1, e)
+ next
+ end
end
f = format("%s/%s.%s", s, i, $LIBEXT)
if File.exist?(f)