mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* common.mk (dist): nothing is need to run BASERUBY.
* tool/make-snapshot: new option -archname. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
00ae128346
commit
a2ae773503
3 changed files with 31 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri Sep 26 18:39:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* common.mk (dist): nothing is need to run BASERUBY.
|
||||
|
||||
* tool/make-snapshot: new option -archname.
|
||||
|
||||
Fri Sep 26 18:24:28 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* misc/ruby-mode.el: safe custimizable variables.
|
||||
|
|
|
@ -715,7 +715,7 @@ run.gdb:
|
|||
gdb: miniruby$(EXEEXT) run.gdb PHONY
|
||||
gdb -x run.gdb --quiet --args $(MINIRUBY) $(srcdir)/test.rb
|
||||
|
||||
dist: $(PREP)
|
||||
dist:
|
||||
$(BASERUBY) $(srcdir)/tool/make-snapshot .
|
||||
|
||||
up:
|
||||
|
|
|
@ -6,6 +6,9 @@ require 'fileutils'
|
|||
require 'tmpdir'
|
||||
STDOUT.sync = true
|
||||
|
||||
$exported = nil if $exported == ""
|
||||
$archname = nil if $archname == ""
|
||||
|
||||
ENV["LC_ALL"] = ENV["LANG"] = "C"
|
||||
SVNURL = URI.parse("http://svn.ruby-lang.org/repos/ruby/")
|
||||
RUBY_VERSION_PATTERN = /^\#define\s+RUBY_VERSION\s+"([\d.]+)"/
|
||||
|
@ -22,7 +25,7 @@ path = ENV["PATH"].split(File::PATH_SEPARATOR)
|
|||
%w[YACC BASERUBY RUBY MV MINIRUBY].each do |var|
|
||||
cmd = ENV[var]
|
||||
unless path.any? {|dir|
|
||||
file = File.join(dir, cmd)
|
||||
file = File.expand_path(cmd, dir)
|
||||
File.file?(file) and File.executable?(file)
|
||||
}
|
||||
abort "#{File.basename $0}: #{var} command not found - #{cmd}"
|
||||
|
@ -74,9 +77,15 @@ def package(rev, destdir)
|
|||
end
|
||||
revision = `svn info #{url}`[/Last Changed Rev: (\d+)/, 1]
|
||||
end
|
||||
unless $exported
|
||||
v = nil
|
||||
if $exported
|
||||
if String === $exported
|
||||
v = $exported
|
||||
end
|
||||
else
|
||||
v = "ruby"
|
||||
puts "Exporting #{rev}@#{revision}"
|
||||
IO.popen("svn export #{url} ruby") do |pipe|
|
||||
IO.popen("svn export #{url} #{v}") do |pipe|
|
||||
pipe.each {|line| /^A/ =~ line or print line}
|
||||
end
|
||||
unless $?.success?
|
||||
|
@ -85,7 +94,7 @@ def package(rev, destdir)
|
|||
end
|
||||
end
|
||||
|
||||
if !File.directory?(v = "ruby")
|
||||
if !File.directory?(v)
|
||||
v = Dir.glob("ruby-*").select(&File.method(:directory?))
|
||||
v.size == 1 or abort "not exported"
|
||||
v = v[0]
|
||||
|
@ -100,8 +109,11 @@ def package(rev, destdir)
|
|||
else
|
||||
tag ||= "r#{revision}"
|
||||
end
|
||||
v = "ruby-#{version}-#{tag}"
|
||||
File.directory?(v) or File.rename "ruby", v
|
||||
unless v == $exported
|
||||
n = "ruby-#{version}-#{tag}"
|
||||
File.directory?(n) or File.rename v, n
|
||||
v = n
|
||||
end
|
||||
system("patch -d #{v} -p0 -i #{$patch_file}") if $patch_file
|
||||
def (clean = []).add(n) push(n); n end
|
||||
Dir.chdir(v) do
|
||||
|
@ -154,11 +166,16 @@ def package(rev, destdir)
|
|||
puts " done"
|
||||
end
|
||||
|
||||
if v == "."
|
||||
v = File.basename(Dir.pwd)
|
||||
Dir.chdir ".."
|
||||
end
|
||||
|
||||
return [["bzip tarball", ".tar.bz2", %w"tar cjf"],
|
||||
["gzip tarball", ".tar.gz", %w"tar czf"],
|
||||
["zip archive", ".zip", %w"zip -qr"]
|
||||
].collect do |mesg, ext, cmd|
|
||||
file = "#{destdir}/#{v}#{ext}"
|
||||
file = "#{destdir}/#{v||$archname}#{ext}"
|
||||
print "creating #{mesg}... #{file}"
|
||||
if system(*(cmd + [file, v]))
|
||||
puts " done"
|
||||
|
|
Loading…
Reference in a new issue