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

ruby-changes:9913

From: yugui <ko1@a...>
Date: Mon, 12 Jan 2009 22:32:19 +0900 (JST)
Subject: [ruby-changes:9913] Ruby:r21453 (ruby_1_9_1): merges r21364 and r21370 from trunk into ruby_1_9_1.

yugui	2009-01-12 22:31:41 +0900 (Mon, 12 Jan 2009)

  New Revision: 21453

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

  Log:
    merges r21364 and r21370 from trunk into ruby_1_9_1.
    * instruby.rb: use installed libraries.  [ruby-core:21006]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/common.mk
    branches/ruby_1_9_1/instruby.rb

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21452)
+++ ruby_1_9_1/ChangeLog	(revision 21453)
@@ -1,5 +1,18 @@
+Wed Jan  7 22:13:03 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* instruby.rb (man, gem): fixed errors.
+
+Wed Jan  7 17:14:40 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* instruby.rb: use installed libraries.  [ruby-core:21006]
+
 Wed Jan  7 17:13:38 2009  Nobuyoshi Nakada  <nobu@r...>
+ 
+ 	* instruby.rb (gem), lib/rubygems/defaults.rb (Gem.default_dir):
+ 	  use version invariant configuration.
 
+	* instruby.rb: use installed libraries.  [ruby-core:21006]
+
 	* instruby.rb (gem), lib/rubygems/defaults.rb (Gem.default_dir):
 	  use version invariant configuration.
 
Index: ruby_1_9_1/common.mk
===================================================================
--- ruby_1_9_1/common.mk	(revision 21452)
+++ ruby_1_9_1/common.mk	(revision 21453)
@@ -102,6 +102,7 @@
 		--make-flags="$(MAKEFLAGS)"
 EXTMK_ARGS    =	$(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \
 		--make-flags="MINIRUBY='$(MINIRUBY)'" --
+INSTRUBY      =	$(MINIRUBY) $(srcdir)/instruby.rb
 INSTRUBY_ARGS =	$(SCRIPT_ARGS) \
 		--data-mode=$(INSTALL_DATA_MODE) \
 		--prog-mode=$(INSTALL_PROG_MODE) \
@@ -163,65 +164,65 @@
 install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
 pre-install-nodoc:: pre-install-local pre-install-ext
 do-install-nodoc: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)"
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)"
 post-install-nodoc:: post-install-local post-install-ext
 
 install-local: pre-install-local do-install-local post-install-local
 pre-install-local:: pre-install-bin pre-install-lib pre-install-man
 do-install-local: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)"
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)"
 post-install-local:: post-install-bin post-install-lib post-install-man
 
 install-ext: pre-install-ext do-install-ext post-install-ext
 pre-install-ext:: pre-install-ext-arch pre-install-ext-comm
 do-install-ext: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext
 post-install-ext:: post-install-ext-arch post-install-ext-comm
 
 install-arch: pre-install-arch do-install-arch post-install-arch
 pre-install-arch:: pre-install-bin pre-install-ext-arch
 do-install-arch: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch
 post-install-arch:: post-install-bin post-install-ext-arch
 
 install-comm: pre-install-comm do-install-comm post-install-comm
 pre-install-comm:: pre-install-lib pre-install-ext-comm pre-install-man
 do-install-comm: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man
 post-install-comm:: post-install-lib post-install-ext-comm post-install-man
 
 install-bin: pre-install-bin do-install-bin post-install-bin
 pre-install-bin:: install-prereq
 do-install-bin: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin
 post-install-bin::
 	@$(NULLCMD)
 
 install-lib: pre-install-lib do-install-lib post-install-lib
 pre-install-lib:: install-prereq
 do-install-lib: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib
 post-install-lib::
 	@$(NULLCMD)
 
 install-ext-comm: pre-install-ext-comm do-install-ext-comm post-install-ext-comm
 pre-install-ext-comm:: install-prereq
 do-install-ext-comm: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm
 post-install-ext-comm::
 	@$(NULLCMD)
 
 install-ext-arch: pre-install-ext-arch do-install-ext-arch post-install-ext-arch
 pre-install-ext-arch:: install-prereq
 do-install-ext-arch: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch
 post-install-ext-arch::
 	@$(NULLCMD)
 
 install-man: pre-install-man do-install-man post-install-man
 pre-install-man:: install-prereq
 do-install-man: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)"
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)"
 post-install-man::
 	@$(NULLCMD)
 
@@ -234,42 +235,42 @@
 no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc
 pre-no-install-nodoc:: pre-no-install-local pre-no-install-ext
 dont-install-nodoc:  $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)"
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)"
 post-no-install-nodoc:: post-no-install-local post-no-install-ext
 
 what-where-local: no-install-local
 no-install-local: pre-no-install-local dont-install-local post-no-install-local
 pre-no-install-local:: pre-no-install-bin pre-no-install-lib pre-no-install-man
 dont-install-local: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)"
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)"
 post-no-install-local:: post-no-install-bin post-no-install-lib post-no-install-man
 
 what-where-ext: no-install-ext
 no-install-ext: pre-no-install-ext dont-install-ext post-no-install-ext
 pre-no-install-ext:: pre-no-install-ext-arch pre-no-install-ext-comm
 dont-install-ext: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext
 post-no-install-ext:: post-no-install-ext-arch post-no-install-ext-comm
 
 what-where-arch: no-install-arch
 no-install-arch: pre-no-install-arch dont-install-arch post-no-install-arch
 pre-no-install-arch:: pre-no-install-bin pre-no-install-ext-arch
 dont-install-arch: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch
 post-no-install-arch:: post-no-install-lib post-no-install-man post-no-install-ext-arch
 
 what-where-comm: no-install-comm
 no-install-comm: pre-no-install-comm dont-install-comm post-no-install-comm
 pre-no-install-comm:: pre-no-install-lib pre-no-install-ext-comm pre-no-install-man
 dont-install-comm: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man
 post-no-install-comm:: post-no-install-lib post-no-install-ext-comm post-no-install-man
 
 what-where-bin: no-install-bin
 no-install-bin: pre-no-install-bin dont-install-bin post-no-install-bin
 pre-no-install-bin:: install-prereq
 dont-install-bin: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin
 post-no-install-bin::
 	@$(NULLCMD)
 
@@ -277,7 +278,7 @@
 no-install-lib: pre-no-install-lib dont-install-lib post-no-install-lib
 pre-no-install-lib:: install-prereq
 dont-install-lib: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib
 post-no-install-lib::
 	@$(NULLCMD)
 
@@ -285,7 +286,7 @@
 no-install-ext-comm: pre-no-install-ext-comm dont-install-ext-comm post-no-install-ext-comm
 pre-no-install-ext-comm:: install-prereq
 dont-install-ext-comm: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm
 post-no-install-ext-comm::
 	@$(NULLCMD)
 
@@ -293,7 +294,7 @@
 no-install-ext-arch: pre-no-install-ext-arch dont-install-ext-arch post-no-install-ext-arch
 pre-no-install-ext-arch:: install-prereq
 dont-install-ext-arch: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch
 post-no-install-ext-arch::
 	@$(NULLCMD)
 
@@ -301,14 +302,14 @@
 no-install-man: pre-no-install-man dont-install-man post-no-install-man
 pre-no-install-man:: install-prereq
 dont-install-man: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)"
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)"
 post-no-install-man::
 	@$(NULLCMD)
 
 install-doc: rdoc pre-install-doc do-install-doc post-install-doc
 pre-install-doc:: install-prereq
 do-install-doc: $(PROGRAM)
-	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
+	$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
 post-install-doc::
 	@$(NULLCMD)
 
@@ -320,7 +321,7 @@
 no-install-doc: pre-no-install-doc dont-install-doc post-no-install-doc
 pre-no-install-doc:: install-prereq
 dont-install-doc:: $(PREP)
-	$(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
+	$(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
 post-no-install-doc::
 	@$(NULLCMD)
 
Index: ruby_1_9_1/instruby.rb
===================================================================
--- ruby_1_9_1/instruby.rb	(revision 21452)
+++ ruby_1_9_1/instruby.rb	(revision 21453)
@@ -5,13 +5,14 @@
 $".unshift File.expand_path("./rbconfig.rb")
 
 srcdir = File.dirname(__FILE__)
-$:.unshift File.expand_path("lib", srcdir)
+unless defined?(CROSS_COMPILING) and CROSS_COMPILING
+  $:.replace([File.expand_path("lib", srcdir), Dir.pwd])
+end
 require 'fileutils'
 require 'shellwords'
 require 'optparse'
 require 'optparse/shellwords'
 require 'tempfile'
-require 'rdoc/ri/paths'
 
 STDOUT.sync = true
 File.umask(0)
@@ -386,17 +387,15 @@
     if $mantype == "doc"
       install mdoc, destfile, :mode => $data_mode
     else
-      require "../tool/mdoc2man.rb"
+      require File.join(srcdir, "tool/mdoc2man.rb")
 
-      w = Tempfile.open(mdoc)
-
-      open(mdoc) { |r|
-        Mdoc2Man.mdoc2man(r, w)
-      }
-
-      w.close
-
+      w = nil
+      Tempfile.open(mdoc) do |f|
+        w = f
+        open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)}
+      end
       install w.path, destfile, :mode => $data_mode
+      w.close!
     end
   end
 end

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

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