summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-07 11:54:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-07 11:54:58 +0000
commit9833ae93cf53a6757f38f5371eb8f4e93babefdc (patch)
tree344a01a17692b74ea50abf21ea78779d898fdd25 /tool
parent0581320a59b65ef826116cbc637b0e5eb02ce525 (diff)
make-snapshot: follow previous commits
* tool/make-snapshot (package): set @ruby_version@ and BOOTSTRAPRUBY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot8
1 files changed, 5 insertions, 3 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index afdcab0..2743743 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -279,7 +279,7 @@ def package(vcs, rev, destdir, tmp = nil)
f.puts "s,@CP@,|#_!!_#|cp,g"
f.puts "s,@rubyarchdir@,|#_!!_#|,g"
f.puts "s,@rubylibprefix@,|#_!!_#|,g"
- f.puts "s,@ruby_version@,|#_!!_#|,g"
+ f.puts "s,@ruby_version@,|#_!!_#|#{version},g"
}
FileUtils.mkpath(hdrdir = "#{extout}/include/ruby")
File.open("#{hdrdir}/config.h", "w") {}
@@ -287,6 +287,7 @@ def package(vcs, rev, destdir, tmp = nil)
File.open("#{defaults}/operating_system.rb", "w") {}
File.open("#{defaults}/ruby.rb", "w") {}
miniruby = ENV['MINIRUBY'] + " -I. -I#{extout} -rcross"
+ baseruby = ENV["BASERUBY"]
mk = IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]}
mk << commonmk.gsub(/(?<!#)\{[^{}]*\}/, "")
cmd = %W[make -f -
@@ -298,7 +299,8 @@ def package(vcs, rev, destdir, tmp = nil)
RUNRUBY=#{miniruby}
RUBY=#{ENV["RUBY"]}
HAVE_BASERUBY=yes
- BASERUBY=#{ENV["BASERUBY"]}
+ BASERUBY=#{baseruby}
+ BOOTSTRAPRUBY=#{baseruby}
PWD=#{Dir.pwd}
prereq]
IO.popen(cmd, "w") do |f|
@@ -312,7 +314,7 @@ def package(vcs, rev, destdir, tmp = nil)
system(*%W"#{YACC} -o parse.c parse.y")
end
vcs.after_export(".") if exported
- FileUtils.rm_rf(clean)
+ FileUtils.rm_rf(clean) unless $keep_temp
FileUtils.rm_rf(".downloaded-cache")
if File.exist?("gems/bundled_gems")
gems = Dir.glob("gems/*.gem")