diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-22 01:00:42 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-22 01:00:42 +0000 |
commit | d3c8811a5bbc1d4e1954ca771cfa83fca8a48b33 (patch) | |
tree | 7a2695ca64251264a925693108d791b1a65758ea /lib | |
parent | b60852e199a18f6965e50af4f5e94a106c8bc94e (diff) | |
download | ruby-d3c8811a5bbc1d4e1954ca771cfa83fca8a48b33.tar.gz |
* lib/mkmf.rb (link_command, cc_command, cpp_command): do not expand
::CONFIG which is an alias of MAKEFILE_CONFIG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 21fc2fce1f..a5ed57bdc5 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -266,8 +266,7 @@ ensure end def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH) - Config::expand(TRY_LINK.dup, - CONFIG.merge('hdrdir' => $hdrdir.quote, + conf = Config::CONFIG.merge('hdrdir' => $hdrdir.quote, 'src' => CONFTEST_C, 'INCFLAGS' => $INCFLAGS, 'CPPFLAGS' => $CPPFLAGS, @@ -276,17 +275,20 @@ def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH) 'LDFLAGS' => "#$LDFLAGS #{ldflags}", 'LIBPATH' => libpathflag(libpath), 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs", - 'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS")) + 'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS") + Config::expand(TRY_LINK.dup, conf) end def cc_command(opt="") + conf = Config::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote) Config::expand("$(CC) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}", - CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)) + conf) end def cpp_command(outfile, opt="") + conf = Config::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote) Config::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}", - CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)) + conf) end def libpathflag(libpath=$DEFLIBPATH|$LIBPATH) |