Skip to content

Commit

Permalink
Merge master.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ford committed Nov 22, 2010
1 parent ac331b4 commit 31a0d90
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
18 changes: 15 additions & 3 deletions Rakefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -44,9 +44,21 @@ unless BUILD_CONFIG[:which_ruby] == :ruby or BUILD_CONFIG[:which_ruby] == :rbx
exit 1 exit 1
end end


bin = RbConfig::CONFIG["RUBY_INSTALL_NAME"] || RbConfig::CONFIG["ruby_install_name"] # Records the full path to the ruby executable that runs this configure
bin << (RbConfig::CONFIG['EXEEXT'] || RbConfig::CONFIG['exeext'] || '') # script. That path will be made available to the rest of the build system
build_ruby = File.join(RbConfig::CONFIG['bindir'], bin) # so the same version of ruby is invoked as needed.
#
# This is duplicated from the configure script for now.
@build_ruby = nil

def build_ruby
unless @build_ruby
bin = RbConfig::CONFIG["RUBY_INSTALL_NAME"] || RbConfig::CONFIG["ruby_install_name"]
bin += (RbConfig::CONFIG['EXEEXT'] || RbConfig::CONFIG['exeext'] || '')
@build_ruby = File.join(RbConfig::CONFIG['bindir'], bin)
end
@build_ruby
end


unless BUILD_CONFIG[:build_ruby] == build_ruby unless BUILD_CONFIG[:build_ruby] == build_ruby
STDERR.puts "\nUnable to build using the running Ruby executable.\n\n" STDERR.puts "\nUnable to build using the running Ruby executable.\n\n"
Expand Down
12 changes: 8 additions & 4 deletions configure
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Configure
@install = false @install = false
@version_19 = false @version_19 = false
@version_20 = false @version_20 = false
@build_ruby = nil


# LLVM settings # LLVM settings
@use_llvm = true @use_llvm = true
Expand Down Expand Up @@ -561,7 +562,7 @@ class Configure
system "./#{basename}" system "./#{basename}"
return $?.exitstatus return $?.exitstatus
ensure ensure
File.delete *Dir["#{basename}*"] File.delete(*Dir["#{basename}*"])
end end
end end


Expand Down Expand Up @@ -708,9 +709,12 @@ int main() { return tgetnum(""); }
# script. That path will be made available to the rest of the build system # script. That path will be made available to the rest of the build system
# so the same version of ruby is invoked as needed. # so the same version of ruby is invoked as needed.
def build_ruby def build_ruby
bin = RbConfig::CONFIG["RUBY_INSTALL_NAME"] || RbConfig::CONFIG["ruby_install_name"] unless @build_ruby
bin << (RbConfig::CONFIG['EXEEXT'] || RbConfig::CONFIG['exeext'] || '') bin = RbConfig::CONFIG["RUBY_INSTALL_NAME"] || RbConfig::CONFIG["ruby_install_name"]
File.join(RbConfig::CONFIG['bindir'], bin) bin += (RbConfig::CONFIG['EXEEXT'] || RbConfig::CONFIG['exeext'] || '')
@build_ruby = File.join(RbConfig::CONFIG['bindir'], bin)
end
@build_ruby
end end


def get_system_name def get_system_name
Expand Down

0 comments on commit 31a0d90

Please sign in to comment.