mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
make-snapshot: download by after-update
* tool/make-snapshot (package): download config files, bundled gems, and Unicode data by after-update. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f54774e351
commit
5643b42881
1 changed files with 4 additions and 20 deletions
|
@ -217,15 +217,6 @@ def package(rev, destdir)
|
||||||
"take a breath, and go ahead".scan(/./) {|c|print c; sleep(c == "," ? 0.7 : 0.05)}; puts
|
"take a breath, and go ahead".scan(/./) {|c|print c; sleep(c == "," ? 0.7 : 0.05)}; puts
|
||||||
def (clean = []).add(n) push(n); n end
|
def (clean = []).add(n) push(n); n end
|
||||||
Dir.chdir(v) do
|
Dir.chdir(v) do
|
||||||
%w[config.guess config.sub].each do |conf|
|
|
||||||
next if File.exist?("tool/#{conf}")
|
|
||||||
begin
|
|
||||||
require File.expand_path("downloader", $tooldir)
|
|
||||||
rescue LoadError
|
|
||||||
abort "Error!!! Copy 'downloader.rb' from 'tool' directory of the recent ruby repository!"
|
|
||||||
end
|
|
||||||
Downloader::GNU.download(conf, "tool")
|
|
||||||
end
|
|
||||||
File.open(clean.add("cross.rb"), "w") do |f|
|
File.open(clean.add("cross.rb"), "w") do |f|
|
||||||
f.puts "Object.__send__(:remove_const, :CROSS_COMPILING) if defined?(CROSS_COMPILING)"
|
f.puts "Object.__send__(:remove_const, :CROSS_COMPILING) if defined?(CROSS_COMPILING)"
|
||||||
f.puts "CROSS_COMPILING=true"
|
f.puts "CROSS_COMPILING=true"
|
||||||
|
@ -266,26 +257,19 @@ def package(rev, destdir)
|
||||||
FileUtils.mkpath(hdrdir = "#{extout}/include/ruby")
|
FileUtils.mkpath(hdrdir = "#{extout}/include/ruby")
|
||||||
File.open("#{hdrdir}/config.h", "w") {}
|
File.open("#{hdrdir}/config.h", "w") {}
|
||||||
miniruby = ENV['MINIRUBY'] + " -r./cross"
|
miniruby = ENV['MINIRUBY'] + " -r./cross"
|
||||||
IO.popen("make -f - prereq"\
|
mk = IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]}
|
||||||
|
mk << commonmk.gsub(/\{[^{}]*\}/, "")
|
||||||
|
IO.popen("make -f - #{mk[/^after-update/]} prereq"\
|
||||||
" srcdir=. CHDIR=cd PATH_SEPARATOR='#{File::PATH_SEPARATOR}'"\
|
" srcdir=. CHDIR=cd PATH_SEPARATOR='#{File::PATH_SEPARATOR}'"\
|
||||||
" IFCHANGE=tool/ifchange MAKEDIRS='mkdir -p'"\
|
" IFCHANGE=tool/ifchange MAKEDIRS='mkdir -p'"\
|
||||||
" 'MINIRUBY=#{miniruby}' 'RUBY=#{ENV["RUBY"]}'", "w") do |f|
|
" 'MINIRUBY=#{miniruby}' 'RUBY=#{ENV["RUBY"]}'", "w") do |f|
|
||||||
f.puts(IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]})
|
f.puts mk
|
||||||
f.puts(commonmk.gsub(/\{[^{}]*\}/, ""))
|
|
||||||
end
|
end
|
||||||
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk")
|
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk")
|
||||||
print "prerequisites"
|
print "prerequisites"
|
||||||
else
|
else
|
||||||
system("#{YACC} -o parse.c parse.y")
|
system("#{YACC} -o parse.c parse.y")
|
||||||
end
|
end
|
||||||
if File.file?('gems/bundled_gems') && bundled_gems = File.read('gems/bundled_gems')
|
|
||||||
bundled_gems.split("\n").map(&:split).each do |gem, ver|
|
|
||||||
gem_name = "#{gem}-#{ver}.gem"
|
|
||||||
unless File.file?("gems/#{gem_name}")
|
|
||||||
Downloader::RubyGems.download(gem_name, "gems")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
FileUtils.rm_rf(clean)
|
FileUtils.rm_rf(clean)
|
||||||
unless $?.success?
|
unless $?.success?
|
||||||
puts " failed"
|
puts " failed"
|
||||||
|
|
Loading…
Add table
Reference in a new issue