1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/mkmf.rb: initialize $top_srcdir always. [ruby-dev:31682]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-08-30 04:49:27 +00:00
parent 10084a3e61
commit 18c9e590c3
2 changed files with 4 additions and 1 deletions

View file

@ -1,4 +1,6 @@
Thu Aug 30 13:13:13 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
Thu Aug 30 13:49:25 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb: initialize $top_srcdir always. [ruby-dev:31682]
* lib/mkmf.rb (try_const, have_const): check for a const is defined.
[ruby-core:04422]

View file

@ -124,6 +124,7 @@ extdir = File.expand_path("ext", topdir)
$extmk = File.expand_path($0)[0, extdir.size+1] == extdir+"/"
if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h")
$topdir = $hdrdir
$top_srcdir = $hdrdir
$arch_hdrdir = $hdrdir + "/$(arch)"
elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h") and
File.exist?("#{CONFIG["EXTOUT"]}/include/#{CONFIG["arch"]}/ruby/config.h")