* 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/trunk@9051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aae7040cd0
commit
624842f6a0
@ -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]
|
* 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>
|
Tue Aug 30 19:34:27 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
* ext/digest/md5/md5ossl.h, ext/digest/rmd160/rmd160ossl.h,
|
* ext/digest/md5/md5ossl.h, ext/digest/rmd160/rmd160ossl.h,
|
||||||
|
36
lib/mkmf.rb
36
lib/mkmf.rb
@ -215,7 +215,6 @@ module Logging
|
|||||||
end
|
end
|
||||||
|
|
||||||
def xsystem command
|
def xsystem command
|
||||||
Config.expand(command)
|
|
||||||
Logging::open do
|
Logging::open do
|
||||||
puts command.quote
|
puts command.quote
|
||||||
system(command)
|
system(command)
|
||||||
@ -223,7 +222,6 @@ def xsystem command
|
|||||||
end
|
end
|
||||||
|
|
||||||
def xpopen command, *mode, &block
|
def xpopen command, *mode, &block
|
||||||
Config.expand(command)
|
|
||||||
Logging::open do
|
Logging::open do
|
||||||
case mode[0]
|
case mode[0]
|
||||||
when nil, /^r/
|
when nil, /^r/
|
||||||
@ -262,31 +260,33 @@ end
|
|||||||
|
|
||||||
def link_command(ldflags, opt="", libpath=$LIBPATH)
|
def link_command(ldflags, opt="", libpath=$LIBPATH)
|
||||||
Config::expand(TRY_LINK.dup,
|
Config::expand(TRY_LINK.dup,
|
||||||
'hdrdir' => $hdrdir,
|
CONFIG.merge('hdrdir' => $hdrdir.quote,
|
||||||
'src' => CONFTEST_C,
|
'src' => CONFTEST_C,
|
||||||
'INCFLAGS' => $INCFLAGS,
|
'INCFLAGS' => $INCFLAGS,
|
||||||
'CPPFLAGS' => $CPPFLAGS,
|
'CPPFLAGS' => $CPPFLAGS,
|
||||||
'CFLAGS' => "#$CFLAGS",
|
'CFLAGS' => "#$CFLAGS",
|
||||||
'ARCH_FLAG' => "#$ARCH_FLAG",
|
'ARCH_FLAG' => "#$ARCH_FLAG",
|
||||||
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
|
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
|
||||||
'LIBPATH' => libpathflag(libpath),
|
'LIBPATH' => libpathflag(libpath),
|
||||||
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
|
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
|
||||||
'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS")
|
'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def cc_command(opt="")
|
def cc_command(opt="")
|
||||||
"$(CC) -c #$INCFLAGS -I#{$hdrdir} " \
|
Config::expand("$(CC) -c #$INCFLAGS -I$(hdrdir) " \
|
||||||
"#$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} #{CONFTEST_C}"
|
"#$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} #{CONFTEST_C}",
|
||||||
|
CONFIG.merge('hdrdir' => $hdrdir.quote))
|
||||||
end
|
end
|
||||||
|
|
||||||
def cpp_command(outfile, opt="")
|
def cpp_command(outfile, opt="")
|
||||||
"$(CPP) #$INCFLAGS -I#{$hdrdir} " \
|
Config::expand("$(CPP) #$INCFLAGS -I$(hdrdir) " \
|
||||||
"#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}"
|
"#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}",
|
||||||
|
CONFIG.merge('hdrdir' => $hdrdir.quote))
|
||||||
end
|
end
|
||||||
|
|
||||||
def libpathflag(libpath=$LIBPATH)
|
def libpathflag(libpath=$LIBPATH)
|
||||||
libpath.map{|x|
|
libpath.map{|x|
|
||||||
(x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x
|
(x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x.quote
|
||||||
}.join
|
}.join
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -849,7 +849,7 @@ SHELL = /bin/sh
|
|||||||
|
|
||||||
#### Start of system configuration section. ####
|
#### 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}
|
topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote}
|
||||||
hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'}
|
hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'}
|
||||||
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
|
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user