summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 01:32:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 01:32:49 +0000
commitac0ab1f67511487d5afbc0d24aa37709b504d8d8 (patch)
treea146706508d25974a07b8884fd27ac788a5b571b
parentfe244c77b0ac09fedbb000eb80c8c0ac599e1a00 (diff)
* lib/mkmf.rb: should quote arch_hdrdir and libpath for the case
installed prefix contains spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/mkmf.rb10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d1b8847..9c99862 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jun 11 10:32:46 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb: should quote arch_hdrdir and libpath for the case
+ installed prefix contains spaces.
+
Sat Jun 11 10:20:52 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (native_cond_timeout): wrap conditinally used label.
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 8cd6018..9b0b8c7 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -392,22 +392,22 @@ end
def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote,
'src' => "#{CONFTEST_C}",
- 'arch_hdrdir' => "#$arch_hdrdir",
+ 'arch_hdrdir' => $arch_hdrdir.quote,
'top_srcdir' => $top_srcdir.quote,
'INCFLAGS' => "#$INCFLAGS",
'CPPFLAGS' => "#$CPPFLAGS",
'CFLAGS' => "#$CFLAGS",
'ARCH_FLAG' => "#$ARCH_FLAG",
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
- 'LIBPATH' => libpathflag(libpath),
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS")
+ conf['LIBPATH'] = libpathflag(libpath.map {|s| RbConfig::expand(s.dup, conf)})
RbConfig::expand(TRY_LINK.dup, conf)
end
def cc_command(opt="")
conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
- 'arch_hdrdir' => "#$arch_hdrdir",
+ 'arch_hdrdir' => $arch_hdrdir.quote,
'top_srcdir' => $top_srcdir.quote)
RbConfig::expand("$(CC) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}",
conf)
@@ -415,7 +415,7 @@ end
def cpp_command(outfile, opt="")
conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
- 'arch_hdrdir' => "#$arch_hdrdir",
+ 'arch_hdrdir' => $arch_hdrdir.quote,
'top_srcdir' => $top_srcdir.quote)
RbConfig::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}",
conf)
@@ -1648,7 +1648,7 @@ ECHO = $(ECHO1:0=@echo)
srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2])}.quote}
topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).quote}
hdrdir = #{mkintpath(CONFIG["hdrdir"]).quote}
-arch_hdrdir = #{$arch_hdrdir}
+arch_hdrdir = #{$arch_hdrdir.quote}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
}
if $extmk