summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 0610020912..370523d97b 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -63,7 +63,20 @@ File.foreach "config.status" do |$_|
end
print v_fast, v_others
-print " CONFIG[\"compile_dir\"] = \"#{File.expand_path(File.dirname($0))}\"\n"
-print "end\n"
+print <<EOS
+ CONFIG["compile_dir"] = "#{File.expand_path(File.dirname($0))}"
+ CONFIG.each_value do |val|
+ val.gsub!(/\\$\\(([^()]+)\\)/) do |var|
+ key = $1
+ if CONFIG.key? key
+ "\#{CONFIG[\\\"\#{key}\\\"]}"
+ else
+ var
+ end
+ end
+ end
+end
+EOS
config.close
+
# vi:set sw=2: