なかだです。

At Wed, 7 Jan 2004 12:29:59 +0900,
IWATSUKI Hiroyuki wrote:
> > Rev1.93と順序だけ違う(元の順序)
> >   http://www.ccsnet.ne.jp/~ocean/22477/dir.c.1
> > を一度試してみてください。
> 
> 試しましたところ、make test が無事に通りました。ということは中田さんの
> おっしゃる通り順序の問題のみということでしょうか。

これを試してみてください。
* ext/Setupの順序を尊重
* $preloadによる並べ換えの順序をちょっと変更
  (すでに入れてあったのを忘れてました)
* digestをdigest/*より先に初期化

# それはそれとして、find -depthみたいにglobの順序を選べるといい
# かも。


Index: ext/extmk.rb =================================================================== RCS file: /cvs/ruby/src/ruby/ext/extmk.rb,v retrieving revision 1.45 diff -u -2 -p -d -r1.45 extmk.rb --- ext/extmk.rb 28 Dec 2003 17:25:31 -0000 1.45 +++ ext/extmk.rb 7 Jan 2004 01:51:11 -0000 @@ -206,5 +206,5 @@ for dir in ["ext", File::join($top_srcdi end target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM - $static_ext[target] = true + $static_ext[target] = $static_ext.size end MTIMES << f.mtime @@ -219,8 +219,13 @@ 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 @@ -234,9 +239,12 @@ if $extlist.size > 0 $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) Index: ext/digest/md5/extconf.rb =================================================================== RCS file: /cvs/ruby/src/ruby/ext/digest/md5/extconf.rb,v retrieving revision 1.4 diff -u -2 -p -d -r1.4 extconf.rb --- ext/digest/md5/extconf.rb 26 Sep 2002 16:27:23 -0000 1.4 +++ ext/digest/md5/extconf.rb 6 Jan 2004 16:19:59 -0000 @@ -25,3 +25,5 @@ have_header("inttypes.h") have_header("unistd.h") +$preload = %w[digest] + create_makefile("digest/md5") Index: ext/digest/rmd160/extconf.rb =================================================================== RCS file: /cvs/ruby/src/ruby/ext/digest/rmd160/extconf.rb,v retrieving revision 1.4 diff -u -2 -p -d -r1.4 extconf.rb --- ext/digest/rmd160/extconf.rb 26 Sep 2002 17:26:46 -0000 1.4 +++ ext/digest/rmd160/extconf.rb 6 Jan 2004 16:20:16 -0000 @@ -24,3 +24,5 @@ have_header("inttypes.h") have_header("unistd.h") +$preload = %w[digest] + create_makefile("digest/rmd160") Index: ext/digest/sha1/extconf.rb =================================================================== RCS file: /cvs/ruby/src/ruby/ext/digest/sha1/extconf.rb,v retrieving revision 1.5 diff -u -2 -p -d -r1.5 extconf.rb --- ext/digest/sha1/extconf.rb 6 Aug 2003 03:11:14 -0000 1.5 +++ ext/digest/sha1/extconf.rb 6 Jan 2004 16:20:27 -0000 @@ -23,3 +23,5 @@ have_header("inttypes.h") have_header("unistd.h") +$preload = %w[digest] + create_makefile("digest/sha1") Index: ext/digest/sha2/extconf.rb =================================================================== RCS file: /cvs/ruby/src/ruby/ext/digest/sha2/extconf.rb,v retrieving revision 1.7 diff -u -2 -p -d -r1.7 extconf.rb --- ext/digest/sha2/extconf.rb 20 Aug 2001 10:55:46 -0000 1.7 +++ ext/digest/sha2/extconf.rb 6 Jan 2004 16:20:40 -0000 @@ -18,4 +18,6 @@ have_header("inttypes.h") have_header("unistd.h") +$preload = %w[digest] + if try_cpp(<<SRC, $defs.join(' ')) #include "defs.h"
-- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦