From: nobu.nokada@... Date: 2004-06-26T10:36:32+09:00 Subject: Re: Problem with mkmf and spaces in directory names? Hi, At Fri, 25 Jun 2004 21:38:11 +0900, Daniel Berger wrote in [ruby-talk:104531]: > No luck. The libpathflag method is never actually reached because the > Quixml extconf.rb file doesn't call create_makefile unless the expat > lib is found. As for the change to $CPPFLAGS, it didn't seem to make > any difference. As far as I can tell, using debug prints, the > $CPPFLAGS are escaped properly. libpathflag is called from every have_library, via try_link. > "-Ic:\program files\expat\source\lib" "-I. -I./.. -I./../missing" tells where the patch was wrong: + $CPPFLAGS = (idirs << $CPPFLAGS).quote.join(" ") should be + $CPPFLAGS = (idirs.quote << $CPPFLAGS).join(" ") That is, previous $CPPFLAGS should not be quoted. But, > -libpath:C:/ruby/lib -libpath:"c:\program files\expat\libs" -libpath seems quoted properly. Hmmm, cl.exe can't deal with quotation inside an argument? Can you try this instead of the previous one? Index: lib/mkmf.rb =================================================================== RCS file: /pub/cvs/ruby/src/ruby/lib/mkmf.rb,v retrieving revision 1.162.2.13 diff -u -2 -p -r1.162.2.13 mkmf.rb --- lib/mkmf.rb 20 May 2004 08:02:11 -0000 1.162.2.13 +++ lib/mkmf.rb 26 Jun 2004 01:34:52 -0000 @@ -252,5 +252,5 @@ def libpathflag(libpath=$LIBPATH) libpath.map{|x| (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x - }.join + }.quote.join end @@ -662,5 +662,5 @@ def dir_config(target, idefault=nil, lde idirs -= Shellwords.shellwords($CPPFLAGS) unless idirs.empty? - $CPPFLAGS = (idirs << $CPPFLAGS).join(" ") + $CPPFLAGS = (idirs.quote << $CPPFLAGS).join(" ") end end -- Nobu Nakada