зеркало из https://github.com/github/ruby.git
mkmf.rb: expand all macros
* lib/mkmf.rb (xsystem): expand environment variable in all macros not expanded with RbConfig. [Bug #8702] * test/mkmf/test_framework.rb (create_framework): replace all $@ not only once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
3168bfe856
Коммит
fcb58bdb38
|
@ -1,3 +1,11 @@
|
|||
Mon Jul 29 14:52:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (xsystem): expand environment variable in all macros not
|
||||
expanded with RbConfig. [Bug #8702]
|
||||
|
||||
* test/mkmf/test_framework.rb (create_framework): replace all $@ not
|
||||
only once.
|
||||
|
||||
Mon Jul 29 06:54:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (rb_w32_pipe): use enum for compile time constants,
|
||||
|
|
|
@ -378,7 +378,7 @@ module MakeMakefile
|
|||
def xsystem command, opts = nil
|
||||
varpat = /\$\((\w+)\)|\$\{(\w+)\}/
|
||||
if varpat =~ command
|
||||
vars = Hash.new {|h, k| h[k] = ''; ENV[k]}
|
||||
vars = Hash.new {|h, k| h[k] = ENV[k]}
|
||||
command = command.dup
|
||||
nil while command.gsub!(varpat) {vars[$1||$2]}
|
||||
end
|
||||
|
|
|
@ -12,8 +12,8 @@ class TestMkmf
|
|||
File.write(src, "void #{fw}(void) {}")
|
||||
cmd = LINK_SO.dup
|
||||
RbConfig.expand(cmd, RbConfig::CONFIG.merge("OBJS"=>src))
|
||||
cmd.sub!("$@", "#{fwdir}/#{fw}")
|
||||
cmd.sub!(/ -bundle /, ' -dynamiclib ')
|
||||
cmd.gsub!("$@", "#{fwdir}/#{fw}")
|
||||
cmd.gsub!(/ -bundle /, ' -dynamiclib ')
|
||||
assert(xsystem(cmd), MKMFLOG)
|
||||
$INCFLAGS << " " << "-F#{dir}".quote
|
||||
yield fw, hdrname
|
||||
|
|
Загрузка…
Ссылка в новой задаче