From: nobu@... Date: 2005-02-01T02:06:14+09:00 Subject: [ruby-dev:25607] Re: merge tcltklib and tk なかだです。 At Mon, 31 Jan 2005 13:38:27 +0900, Hidetoshi NAGAI wrote in [ruby-dev:25604]: > > で,もう少し手を入れて,今度は機能しているように見えます. > > いかがなものでしょう? > > commit しました.問題がありましたらご連絡ください. ソースと別ディレクトリでコンパイルしようとすると、make-tkutilが 見付からなくて失敗します。 こうしてみました。ext/tk/make-tkutilとext/tk/tkutil/subconf.rb は不要になります。 Index: ext/extmk.rb =================================================================== RCS file: /cvs/ruby/src/ruby/ext/extmk.rb,v retrieving revision 1.67 diff -U2 -p -r1.67 extmk.rb --- ext/extmk.rb 31 Jan 2005 15:19:26 -0000 1.67 +++ ext/extmk.rb 31 Jan 2005 16:51:22 -0000 @@ -18,4 +18,5 @@ alias $0 $progname $extlist = [] $extupdate = false +$compiled = {} $:.replace ["."] @@ -74,4 +75,5 @@ def extmake(target) $srcdir = File.join($top_srcdir, "ext", $mdir) $preload = nil + $compiled[target] = false makefile = "./Makefile" unless $ignore @@ -130,4 +132,5 @@ def extmake(target) return true end + $compiled[target] = true args = sysquote($mflags) if $static Index: ext/tk/extconf.rb =================================================================== RCS file: /cvs/ruby/src/ruby/ext/tk/extconf.rb,v retrieving revision 1.8 diff -U2 -p -r1.8 extconf.rb --- ext/tk/extconf.rb 31 Jan 2005 04:17:22 -0000 1.8 +++ ext/tk/extconf.rb 31 Jan 2005 16:35:13 -0000 @@ -270,47 +270,10 @@ if mac_need_framework || # create Makefile - # backup - if $INSTALLFILES - installfiles_bup = $INSTALLFILES.dup - else - installfiles_bup = nil - $INSTALLFILES = [] - end - # for SUPPORT_STATUS + $INSTALLFILES ||= [] $INSTALLFILES << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"] # create create_makefile("tcltklib") - - # reset - $INSTALLFILES = installfiles_bup - - # add rules for tkutil - File::open('Makefile', 'a'){|mfile| - File::open('make-tkutil', 'r'){|dfile| - mfile.print "\n###\n" - while line = dfile.gets() - mfile.print line - end - } - } - - # create tkutil/Makefile - Dir.chdir 'tkutil' - if $extout || $extmk - $srcdir = '../' << $srcdir << '/tkutil' - $topdir = '../' << $topdir - $hdrdir = '../' << $hdrdir - $objs = nil - $defs = [] - Config::CONFIG["srcdir"] = $srcdir - else - puts "entering directory `tkutil'" - end - rm_f './Makefile' - init_mkmf - load 'subconf.rb' - Dir.chdir '..' end end --- /dev/null 1970-01-01 09:00:00.000000000 +0900 +++ ext/tk/tkutil/extconf.rb 2005-02-01 01:47:04.000000000 +0900 @@ -0,0 +1,4 @@ +if $compiled["tk"] + require 'mkmf' + create_makefile('tkutil') +end -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦