From f3d18d8c4c6f7cd3c2065ca75a2553553e9ae31c Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 8 Feb 2008 06:09:23 +0000 Subject: * 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 --- lib/mkmf.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 96696b1f3b..45bf90872d 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -267,6 +267,12 @@ module Logging end 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 puts command.quote system(command) -- cgit v1.2.3