summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-30 14:21:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-30 14:21:18 +0000
commit0b631d6836a4a1ab3d20669a6853c47007fbb9e2 (patch)
treec717818bce265025516c958dca2b209b9872b7f5
parente89058bcaa0b4171a563bde5a82b9441ad2451ef (diff)
* lib/mkmf.rb (xsystem, xpopen): no longer expand by Config.
* lib/mkmf.rb (link_command, cc_command, cpp_command): expand variables at once, and quote hdrdir. fixed: [ruby-core:05680] * lib/mkmf.rb (libpathflag): quote paths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--lib/mkmf.rb36
2 files changed, 26 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 2125d2b54e..b3f2a18c13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,14 @@
-Tue Aug 30 23:06:29 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Aug 30 23:20:19 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_rescue2): intialization miss. fixed: [ruby-dev:26917]
+ * lib/mkmf.rb (xsystem, xpopen): no longer expand by Config.
+
+ * lib/mkmf.rb (link_command, cc_command, cpp_command): expand
+ variables at once, and quote hdrdir. fixed: [ruby-core:05680]
+
+ * lib/mkmf.rb (libpathflag): quote paths.
+
Tue Aug 30 19:34:27 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/digest/md5/md5ossl.h, ext/digest/rmd160/rmd160ossl.h,
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 55b855dc4b..de245363ed 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -215,7 +215,6 @@ module Logging
end
def xsystem command
- Config.expand(command)
Logging::open do
puts command.quote
system(command)
@@ -223,7 +222,6 @@ def xsystem command
end
def xpopen command, *mode, &block
- Config.expand(command)
Logging::open do
case mode[0]
when nil, /^r/
@@ -262,31 +260,33 @@ end
def link_command(ldflags, opt="", libpath=$LIBPATH)
Config::expand(TRY_LINK.dup,
- 'hdrdir' => $hdrdir,
- 'src' => CONFTEST_C,
- '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")
+ CONFIG.merge('hdrdir' => $hdrdir.quote,
+ 'src' => CONFTEST_C,
+ '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"))
end
def cc_command(opt="")
- "$(CC) -c #$INCFLAGS -I#{$hdrdir} " \
- "#$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} #{CONFTEST_C}"
+ Config::expand("$(CC) -c #$INCFLAGS -I$(hdrdir) " \
+ "#$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} #{CONFTEST_C}",
+ CONFIG.merge('hdrdir' => $hdrdir.quote))
end
def cpp_command(outfile, opt="")
- "$(CPP) #$INCFLAGS -I#{$hdrdir} " \
- "#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}"
+ Config::expand("$(CPP) #$INCFLAGS -I$(hdrdir) " \
+ "#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}",
+ CONFIG.merge('hdrdir' => $hdrdir.quote))
end
def libpathflag(libpath=$LIBPATH)
libpath.map{|x|
- (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x
+ (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x.quote
}.join
end
@@ -849,7 +849,7 @@ SHELL = /bin/sh
#### Start of system configuration section. ####
-srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {CONFIG[$1||$2]}}
+srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {CONFIG[$1||$2]}.quote}
topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote}
hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}