summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-04 21:57:32 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-04 21:57:32 +0000
commit323af7e264f6044652bd7a585dada15633da68ba (patch)
treea28c5b60f015efc55815c148e2f43273d32ace77 /lib
parent1e0830c1985e00da3a6bb4e03e7cc7acd1b5612a (diff)
* lib/mkmf.rb: exclude topdir from the system configuration
section and prevent it from being overridden. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 25fb9cbef5..3491662028 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -499,12 +499,12 @@ EOMF
if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty?
mfile.print "\nDESTDIR = ", destdir, "\n"
end
- CONFIG.select do |key, var|
- next if /prefix$/ !~ key
+ CONFIG.each do |key, var|
+ next unless /prefix$/ =~ key
mfile.print key, " = ", with_destdir(var.sub(drive, '')), "\n"
end
- CONFIG.select do |key, var|
- next if key == "srcdir" or /dir$/ !~ key
+ CONFIG.each do |key, var|
+ next unless /^(?:src|top|(.*))dir$/ =~ key and $1
mfile.print key, " = ", with_destdir(var.sub(drive, '')), "\n"
end
mfile.print <<EOMF