mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
d54331b0af
commit
3374d203c1
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue