From: "H.Yamamoto" Date: 2005-04-12T23:57:56+09:00 Subject: [ruby-dev:26035] Re: bcc32、win32 での install-doc の動作 山本です。 >post-install-ext:: > $(MINIRUBY) -I$(srcdir)lib -rrbconfig -rfileutils \ > -e 'FileUtils.rm_f(Dir[File.join(Config::CONFIG["archdir"],"**","*.tds")])' > >という処理が Maskefile.sub にあるのですが、これが ruby_1_8 では正しく動いていません。 初めは下のパッチで動くと思ったのですが、File.join("", "hoge") #=> "/hoge" のため DESTDIRが空のとき動きませんでした。 Index: Makefile.sub =================================================================== RCS file: /src/ruby/bcc32/Makefile.sub,v retrieving revision 1.42.2.15 diff -u -w -b -p -r1.42.2.15 Makefile.sub --- Makefile.sub 11 Apr 2005 03:20:16 -0000 1.42.2.15 +++ Makefile.sub 12 Apr 2005 13:52:29 -0000 @@ -427,7 +427,7 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_ post-install-ext:: $(MINIRUBY) -I$(srcdir)lib -rrbconfig -rfileutils \ - -e 'FileUtils.rm_f(Dir[File.join(Config::CONFIG["archdir"],"**","*.tds")])' + -e 'FileUtils.rm_f(Dir[File.join("$(DESTDIR)",Config::CONFIG["rubylibdir"],"**","*.tds")])' clean-local:: @$(RM) ext\extinit.c ext\extinit.$(OBJEXT) *.tds *.il? $(RUBY_SO_NAME).lib そのため、ext/extmk.rb に手を入れてしまいましたが、こんな感じでいいでしょうか? HEAD も ruby_1_8 も動いているようです。 Index: ext/extmk.rb =================================================================== RCS file: /src/ruby/ext/extmk.rb,v retrieving revision 1.75 diff -u -w -b -p -r1.75 extmk.rb --- ext/extmk.rb 8 Apr 2005 11:18:01 -0000 1.75 +++ ext/extmk.rb 12 Apr 2005 14:45:12 -0000 @@ -363,6 +363,9 @@ if $extout if $install Config.expand(dest = "#{$destdir}#{$rubylibdir}") FileUtils.cp_r(extout+"/.", dest, :verbose => true, :noop => $dryrun) + if $bccwin + Dir.glob("#{dest}/**/*.tds"){|path| File.delete(path)} + end exit end unless $ignore Index: bcc32/Makefile.sub =================================================================== RCS file: /src/ruby/bcc32/Makefile.sub,v retrieving revision 1.71 diff -u -w -b -p -r1.71 Makefile.sub --- bcc32/Makefile.sub 3 Mar 2005 09:44:32 -0000 1.71 +++ bcc32/Makefile.sub 12 Apr 2005 14:40:27 -0000 @@ -426,10 +426,6 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_ -so_name=$(RUBY_SO_NAME) \ . $(icondirs) $(srcdir)win32 -post-install-ext:: - $(MINIRUBY) -I$(srcdir)lib -rrbconfig -rfileutils \ - -e 'FileUtils.rm_f(Dir[File.join(Config::CONFIG["archdir"],"**","*.tds")])' - clean-local:: @$(RM) ext\extinit.c ext\extinit.$(OBJEXT) *.tds *.il? $(RUBY_SO_NAME).lib @$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res ///////////////////////////////////////////////////////////////////////////////// >ruby1.9 でも、 > >..\ruby\bcc32\configure.bat --prefix=e:/temp > >というように prefix にドライブ文字を含め、 > >make DESTDIR=e:/hoge install こちらの方なのですが、instruby.rb から with_destdir を持ってきて、上のパッチの Config.expand(dest = "#{$destdir}#{$rubylibdir}") を置き換えることで *.so もインストールできましたが、rdoc はまだインストールできませんでした。 Generating RDoc documentation .\ruby.exe "../ruby/runruby.rb" --extout=".ext" -- "../ruby//bin/rdoc" - -all --ri --op "e:/hogee:/temp/share/ri/1.9/system" "../ruby/" こちらをどうすればいいかは、よくわかりません。スクリプトでパスを連結してるんじゃなく、 RIDATADIR として makefile で与えられているので・・・