Module | Config |
In: |
ext/mingw-rbconfig.rb
|
This rbconfig.rb corresponds to a Ruby installation for win32 cross-compiled with mingw under i686-linux. It can be used to cross-compile extensions for win32 using said toolchain.
This file assumes that a cross-compiled mingw32 build (compatible with the mswin32 builds) is installed under $HOME/ruby-mingw32.
TOPDIR | = | File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32") |
DESTDIR | = | '' unless defined? DESTDIR |
CONFIG | = | {} |
MAKEFILE_CONFIG | = | {} |
# File ext/mingw-rbconfig.rb, line 154 154: def Config::expand(val, config = CONFIG) 155: val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var| 156: if !(v = $1 || $2) 157: '$' 158: elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]] 159: pat, sub = $1, $2 160: config[v] = false 161: Config::expand(key, config) 162: config[v] = key 163: key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat 164: key 165: else 166: var 167: end 168: end 169: val 170: end