mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/mkmf.rb (xsystem): expand macros like as make.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
52a757686d
commit
f3d18d8c4c
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Fri Feb 8 15:09:21 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/mkmf.rb (xsystem): expand macros like as make.
|
||||||
|
|
||||||
Fri Feb 8 09:27:57 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
Fri Feb 8 09:27:57 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/rdoc/ri/driver.rb (read_yaml): remove SM* for compatibility.
|
* lib/rdoc/ri/driver.rb (read_yaml): remove SM* for compatibility.
|
||||||
|
|
|
@ -267,6 +267,12 @@ module Logging
|
||||||
end
|
end
|
||||||
|
|
||||||
def xsystem command
|
def xsystem command
|
||||||
|
varpat = /\$\((\w+)\)|\$\{(\w+)\}/
|
||||||
|
if varpat =~ command
|
||||||
|
vars = Hash.new {|h, k| h[k] = ''; ENV[k]}
|
||||||
|
command = command.dup
|
||||||
|
nil while command.gsub!(varpat) {vars[$1||$2]}
|
||||||
|
end
|
||||||
Logging::open do
|
Logging::open do
|
||||||
puts command.quote
|
puts command.quote
|
||||||
system(command)
|
system(command)
|
||||||
|
|
Loading…
Reference in a new issue