summaryrefslogtreecommitdiff
path: root/tool/make-snapshot
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-21 03:33:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-21 03:33:18 +0000
commit5643b4288191f44e47c3500b82353b0d5fc2cee2 (patch)
tree6a1bda1f7104d4c6c8a9ed2944d458c9ed4c2545 /tool/make-snapshot
parentf54774e351d805db1ebd9da6e493307334d31730 (diff)
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
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-xtool/make-snapshot24
1 files changed, 4 insertions, 20 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 05e075c581..7b0e37176c 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -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
def (clean = []).add(n) push(n); n end
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|
f.puts "Object.__send__(:remove_const, :CROSS_COMPILING) if defined?(CROSS_COMPILING)"
f.puts "CROSS_COMPILING=true"
@@ -266,26 +257,19 @@ def package(rev, destdir)
FileUtils.mkpath(hdrdir = "#{extout}/include/ruby")
File.open("#{hdrdir}/config.h", "w") {}
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}'"\
" IFCHANGE=tool/ifchange MAKEDIRS='mkdir -p'"\
" '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(commonmk.gsub(/\{[^{}]*\}/, ""))
+ f.puts mk
end
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk")
print "prerequisites"
else
system("#{YACC} -o parse.c parse.y")
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)
unless $?.success?
puts " failed"