30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
|
Index: mkconfig.rb
|
||
|
===================================================================
|
||
|
--- mkconfig.rb.orig 2008-11-21 19:55:28.000000000 +0100
|
||
|
+++ mkconfig.rb 2008-11-21 20:34:41.653180779 +0100
|
||
|
@@ -22,6 +22,7 @@ def (config = "").write(arg)
|
||
|
end
|
||
|
$stdout = config
|
||
|
|
||
|
+configured_prefix = ""
|
||
|
fast = {'prefix'=>TRUE, 'ruby_install_name'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TRUE}
|
||
|
print %[
|
||
|
# This file was created by #{mkconfig} when ruby was built. Any
|
||
|
@@ -86,6 +87,7 @@ File.foreach "config.status" do |line|
|
||
|
val.gsub!(/ +(?!-)/, "=") if name == "configure_args" && /mswin32/ =~ RUBY_PLATFORM
|
||
|
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
||
|
if /^prefix$/ =~ name
|
||
|
+ configured_prefix = val
|
||
|
val = "(TOPDIR || DESTDIR + #{val})"
|
||
|
end
|
||
|
v = " CONFIG[\"#{name}\"] #{vars[name] ? '<< "\n"' : '='} #{val}\n"
|
||
|
@@ -103,7 +105,7 @@ end
|
||
|
drive = File::PATH_SEPARATOR == ';'
|
||
|
|
||
|
prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
|
||
|
-print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
|
||
|
+print " TOPDIR = #{configured_prefix}\n"
|
||
|
print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"
|
||
|
print " CONFIG = {}\n"
|
||
|
print " CONFIG[\"DESTDIR\"] = DESTDIR\n"
|