[前][次][番号順一覧][スレッド一覧]

ruby-changes:8059

From: nobu <ko1@a...>
Date: Fri, 26 Sep 2008 18:40:19 +0900 (JST)
Subject: [ruby-changes:8059] Ruby:r19584 (trunk): * common.mk (dist): nothing is need to run BASERUBY.

nobu	2008-09-26 18:40:04 +0900 (Fri, 26 Sep 2008)

  New Revision: 19584

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19584

  Log:
    * common.mk (dist): nothing is need to run BASERUBY.
    
    * tool/make-snapshot: new option -archname.

  Modified files:
    trunk/ChangeLog
    trunk/common.mk
    trunk/tool/make-snapshot

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19583)
+++ ChangeLog	(revision 19584)
@@ -1,3 +1,9 @@
+Fri Sep 26 18:39:59 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* misc/ruby-mode.el: safe custimizable variables.
Index: common.mk
===================================================================
--- common.mk	(revision 19583)
+++ common.mk	(revision 19584)
@@ -715,7 +715,7 @@
 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:
Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 19583)
+++ tool/make-snapshot	(revision 19584)
@@ -6,6 +6,9 @@
 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 @@
 %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 @@
     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 @@
     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 @@
   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 @@
     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"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]