summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 1e91d65820..1208606aa1 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -34,6 +34,7 @@ module Config
v_fast = []
v_others = []
+vars = {}
has_version = false
File.foreach "config.status" do |line|
next if /^#/ =~ line
@@ -50,8 +51,10 @@ File.foreach "config.status" do |line|
next if /^\$ac_\w+$/ =~ val
next if $install_name and /^RUBY_INSTALL_NAME$/ =~ name
next if $so_name and /^RUBY_SO_NAME$/ =~ name
- v = " CONFIG[\"" + name + "\"] = " +
+ v = " CONFIG[\"" + name + "\"] #{vars[name] ? '<<' : ''}= " +
+ (vars[name] ? '"\n" ' : '') +
val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump + "\n"
+ vars[name] = true
if fast[name]
v_fast << v
else