なかだです。

At Sat, 27 Dec 2003 13:16:10 +0900,
Siena. / SHINAGAWA, Norihide wrote:
> mkmf.rb:String#quote ではなく、mkmf.rb:libpathflag の方ですね。
> ここをシングルクォートで囲むように変更して、ビルドが成功するのを
> RUBYSHELL=sh.exe と RUBYSHELL=cmd.exe の両方で確認できました。

これだと、Windowsではシングルクォートが取り除かれなくてまずいこ
とになるそうなので、一律にクォートするのではなくシステムによっ
てかえないといけないようです。

これでOS/2では通るでしょうか。


Index: configure.in =================================================================== RCS file: /cvs/ruby/src/ruby/configure.in,v retrieving revision 1.217 diff -u -2 -p -r1.217 configure.in --- configure.in 8 Jan 2004 14:55:25 -0000 1.217 +++ configure.in 10 Jan 2004 12:32:36 -0000 @@ -800,5 +800,5 @@ AC_SUBST(LIBEXT)dnl STATIC= -: ${LIBPATHFLAG=' -L%s'} +: ${LIBPATHFLAG=" -L'%s'"} : ${PATHFLAG=''} @@ -874,6 +874,6 @@ if test "$with_dln_a_out" != yes; then if test "$rb_cv_binary_elf" = yes; then LDFLAGS="$LDFLAGS -Wl,-export-dynamic" - LIBPATHFLAG=' -L%1$-s' - RPATHFLAG=' -Wl,-R%1$-s' + LIBPATHFLAG=" -L'%1\$-s'" + RPATHFLAG=" -Wl,-R'%1\$-s'" fi rb_cv_dlopen=yes ;; Index: lib/mkmf.rb =================================================================== RCS file: /cvs/ruby/src/ruby/lib/mkmf.rb,v retrieving revision 1.166 diff -u -2 -p -r1.166 mkmf.rb --- lib/mkmf.rb 9 Jan 2004 02:20:28 -0000 1.166 +++ lib/mkmf.rb 10 Jan 2004 12:17:53 -0000 @@ -250,5 +250,5 @@ end def libpathflag(libpath=$LIBPATH) libpath.map{|x| - (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % %['#{x}'] + (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x }.join end @@ -1037,5 +1037,5 @@ LINK_SO = config_string('LINK_SO') || "$(OBJS) $(LOCAL_LIBS) $(LIBS)" end -LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L%s' +LIBPATHFLAG = config_string('LIBPATHFLAG') || " -L'%s'" RPATHFLAG = config_string('RPATHFLAG') || '' LIBARG = config_string('LIBARG') || '-l%s' Index: bcc32/Makefile.sub =================================================================== RCS file: /cvs/ruby/src/ruby/bcc32/Makefile.sub,v retrieving revision 1.42 diff -u -2 -p -r1.42 Makefile.sub --- bcc32/Makefile.sub 23 Dec 2003 08:29:54 -0000 1.42 +++ bcc32/Makefile.sub 10 Jan 2004 12:22:16 -0000 @@ -381,8 +381,8 @@ s,@ENABLE_SHARED@,yes,;t t s,@OUTFLAG@,-o,;t t s,@CPPOUTFILE@,,;t t -s,@LIBPATHFLAG@, -L%s,;t t +s,@LIBPATHFLAG@, -L"%s",;t t s,@RPATHFLAG@,,;t t s,@LIBARG@,%s.lib,;t t -s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS), $$@, nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE), $$(RESFILE),;t t +s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE), $$(RESFILE),;t t s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c $$(<:/=\),;t t s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -P -c $$(<:/=\),;t t Index: win32/Makefile.sub =================================================================== RCS file: /cvs/ruby/src/ruby/win32/Makefile.sub,v retrieving revision 1.61 diff -u -2 -p -r1.61 Makefile.sub --- win32/Makefile.sub 5 Jan 2004 16:01:54 -0000 1.61 +++ win32/Makefile.sub 10 Jan 2004 12:19:14 -0000 @@ -377,5 +377,5 @@ s,@ENABLE_SHARED@,yes,;t t s,@OUTFLAG@,-Fe,;t t s,@CPPOUTFILE@,-P,;t t -s,@LIBPATHFLAG@, -libpath:%s,;t t +s,@LIBPATHFLAG@, -libpath:"%s",;t t s,@RPATHFLAG@,,;t t s,@LIBARG@,%s.lib,;t t Index: wince/Makefile.sub =================================================================== RCS file: /cvs/ruby/src/ruby/wince/Makefile.sub,v retrieving revision 1.16 diff -u -2 -p -r1.16 Makefile.sub --- wince/Makefile.sub 1 Dec 2003 00:30:37 -0000 1.16 +++ wince/Makefile.sub 10 Jan 2004 12:22:59 -0000 @@ -412,5 +412,5 @@ s,@ENABLE_SHARED@,yes,;t t s,@OUTFLAG@,-Fe,;t t s,@CPPOUTFILE@,-P,;t t -s,@LIBPATHFLAG@, -libpath:%s,;t t +s,@LIBPATHFLAG@, -libpath:"%s",;t t s,@RPATHFLAG@,,;t t s,@LIBARG@,%s.lib,;t t
-- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦