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

ruby-changes:31047

From: nobu <ko1@a...>
Date: Thu, 3 Oct 2013 03:38:01 +0900 (JST)
Subject: [ruby-changes:31047] nobu:r43126 (trunk): rbinstall.rb: reorder

nobu	2013-10-03 03:37:52 +0900 (Thu, 03 Oct 2013)

  New Revision: 43126

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

  Log:
    rbinstall.rb: reorder
    
    * tool/rbinstall.rb: install default targets (:local, :ext) first,
      very time consuming tasks later.

  Modified files:
    trunk/tool/rbinstall.rb
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 43125)
+++ tool/rbinstall.rb	(revision 43126)
@@ -757,18 +757,23 @@ include FileUtils::NoWrite if $dryrun https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L757
 @fileutils_output = STDOUT
 @fileutils_label = ''
 
+all = $install.delete(:all)
 $install << :local << :ext if $install.empty?
-$install.each do |inst|
+installs = $install.map do |inst|
   if !(procs = $install_procs[inst]) || procs.empty?
     next warn("unknown install target - #{inst}")
   end
-  procs.each do |block|
-    dir = Dir.pwd
-    begin
-      block.call
-    ensure
-      Dir.chdir(dir)
-    end
+  procs
+end
+installs.flatten!
+installs.uniq!
+installs |= $install_procs[:all] if all
+installs.each do |block|
+  dir = Dir.pwd
+  begin
+    block.call
+  ensure
+    Dir.chdir(dir)
   end
 end
 

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

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