わたなべです。

"U.Nakamura" <usa / osb.att.ne.jp> writes:

> | むしろ、mkmf.rbで作られたMakefileでmake installしても
> | site-installを意味するとしてしまいたいくらい(Perlのように)。
> 
> それはあるかも。

これはこれで別に提案しようかな?

> 2対0なので、そういう方針にしますか。

しましょう。

> で、あれば、残る問題は、
>  (1) i386-(mswin32|mingw32)を見るか? 見ないか?
>  (2) 見る場合、i386-msvcrtとどちらを優先するか?
> ですね。
> 
> 「見ない」に一票入れときます。

「見ない」ということは結局中田さん案ですよね。賛成です。
つまりこういう結果になります。
% msvcrt-ruby17 -e 'puts $:'
d:/ruby/lib/ruby/site_ruby/1.7
d:/ruby/lib/ruby/site_ruby/1.7/i386-msvcrt
d:/ruby/lib/ruby/site_ruby
d:/ruby/lib/ruby/1.7
d:/ruby/lib/ruby/1.7/i386-mingw32
. 

参考パッチです。

Index: configure.in =================================================================== RCS file: /src/ruby/configure.in,v retrieving revision 1.133 diff -u -1 -r1.133 configure.in --- configure.in 2002/08/21 07:17:55 1.133 +++ configure.in 2002/08/22 06:38:14 @@ -1047,3 +1047,13 @@ cygwin*|mingw*) - RUBY_SO_NAME=$target_os-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} + case "$target_os" in + cygwin*) + RUBY_SO_NAME=$target_os-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} + AC_LIBOBJ([strftime]) + CCDLFLAGS=-DUSEIMPORTLIB ;; + mingw*) + RUBY_SO_NAME=msvcrt-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} + AC_LIBOBJ([win32]) + CFLAGS="-DNT -D__NO_ISOCEXT $CFLAGS" + CCDLFLAGS=-DIMPORT ;; + esac if test x"$enable_shared" = xyes; then @@ -1062,14 +1072,5 @@ SOLIBS='$(LIBS)' - case "$target_os" in - cygwin*) - AC_LIBOBJ([strftime]) - CCDLFLAGS=-DUSEIMPORTLIB ;; - mingw*) - AC_LIBOBJ([win32]) - CFLAGS="-DNT -D__NO_ISOCEXT $CFLAGS" - CCDLFLAGS=-DIMPORT ;; - esac ;; *) - ;; + ;; esac @@ -1148,3 +1149,11 @@ AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}") -AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${arch}") + +case "$target_os" in + mingw*) + AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/i386-msvcrt") + ;; + *) + AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${arch}") + ;; +esac Index: mkconfig.rb =================================================================== RCS file: /src/ruby/mkconfig.rb,v retrieving revision 1.22 diff -u -1 -r1.22 mkconfig.rb --- mkconfig.rb 2002/07/29 05:59:46 1.22 +++ mkconfig.rb 2002/08/22 06:38:14 @@ -95,3 +95,8 @@ CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)" - CONFIG["sitearchdir"] = "$(sitelibdir)/$(arch)" + CONFIG["sitearchdir"] = + if /mswin|mingw/ =~ RUBY_PLATFORM + "$(sitelibdir)/i386-msvcrt" + else + "$(sitelibdir)/$(arch)" + end CONFIG["compile_dir"] = "#{Dir.pwd}" Index: win32/Makefile.sub =================================================================== RCS file: /src/ruby/win32/Makefile.sub,v retrieving revision 1.22 diff -u -1 -r1.22 Makefile.sub --- win32/Makefile.sub 2002/06/11 04:16:58 1.22 +++ win32/Makefile.sub 2002/08/22 06:38:15 @@ -62,2 +62,3 @@ OS = mswin32 +RT = msvcrt @@ -254,3 +255,3 @@ #define RUBY_ARCHLIB "/lib/ruby/1.7/$(ARCH)-$(OS)" -#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/1.7/$(ARCH)-$(OS)" +#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/1.7/$(ARCH)-$(RT)" <<KEEP Index: win32/setup.mak =================================================================== RCS file: /src/ruby/win32/setup.mak,v retrieving revision 1.7 diff -u -1 -r1.7 setup.mak --- win32/setup.mak 2002/04/19 13:06:12 1.7 +++ win32/setup.mak 2002/08/22 06:38:15 @@ -10,2 +10,3 @@ OS = mswin32 +RT = msvcrt @@ -19,3 +20,3 @@ @echo RUBY_INSTALL_NAME = ruby>> $@ - @echo RUBY_SO_NAME = $(OS)-$$(RUBY_INSTALL_NAME)17>> $@ + @echo RUBY_SO_NAME = $(RT)-$$(RUBY_INSTALL_NAME)17>> $@ @echo prefix = /usr>> $@