diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-12 13:31:41 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-12 13:31:41 +0000 |
commit | a87bf91ebdb239db4cc33f02173cdda83f21c908 (patch) | |
tree | 7fc68d7276407c85083990c08bcdd0c4d1fc265a /instruby.rb | |
parent | 44de0737992940fe34d48fe66b14578332bd49aa (diff) | |
download | ruby-a87bf91ebdb239db4cc33f02173cdda83f21c908.tar.gz ruby-a87bf91ebdb239db4cc33f02173cdda83f21c908.tar.xz ruby-a87bf91ebdb239db4cc33f02173cdda83f21c908.zip |
merges r21364 and r21370 from trunk into ruby_1_9_1.
* instruby.rb: use installed libraries. [ruby-core:21006]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rwxr-xr-x | instruby.rb | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/instruby.rb b/instruby.rb index 3c83dc3dc..bf49706a7 100755 --- a/instruby.rb +++ b/instruby.rb @@ -5,13 +5,14 @@ include RbConfig $".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 @@ install?(:local, :comm, :man) do if $mantype == "doc" install mdoc, destfile, :mode => $data_mode else - require "../tool/mdoc2man.rb" - - w = Tempfile.open(mdoc) - - open(mdoc) { |r| - Mdoc2Man.mdoc2man(r, w) - } - - w.close + require File.join(srcdir, "tool/mdoc2man.rb") + 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 |