summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-10 09:53:04 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-10 09:53:04 +0000
commit3374d203c176f95a254cfe817fe571c905fd9389 (patch)
treeb1031447a2eab62b29d222cbcb252aeb1a4a4f3c
parentd54331b0afe5800093b4a2b89e7b5a07b483f45e (diff)
* lib/mkmf.rb: $hdrdir is $top_srcdir if invoked from extmk.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/mkmf.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 1e6a144818..646f85b412 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -43,6 +43,8 @@ $sitedir = CONFIG["sitedir"]
$sitelibdir = CONFIG["sitelibdir"]
$sitearchdir = CONFIG["sitearchdir"]
+$extmk = /extmk\.rb/ =~ $0
+
def dir_re(dir)
Regexp.new('\$(?:\('+dir+'\)|\{'+dir+'\})(?:\$\(target_prefix\)|\{target_prefix\})?')
end
@@ -60,7 +62,7 @@ SITEINSTALL_DIRS = [
[dir_re('archdir'), "$(sitearchdir)$(target_prefix)"]
]
-if File.exist? Config::CONFIG["archdir"] + "/ruby.h"
+if not $extmk and File.exist? Config::CONFIG["archdir"] + "/ruby.h"
$hdrdir = $archdir
elsif File.exist? $srcdir + "/ruby.h"
$hdrdir = $srcdir
@@ -318,7 +320,7 @@ def append_library(libs, lib)
end
def message(*s)
- unless /extmk\.rb/ =~ $0 and not $VERBOSE
+ unless $extmk and not $VERBOSE
print(*s)
STDOUT.flush
end