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 | 944de8e86efad1b69ecbb6956d2e5bcdc8af6c48 (patch) | |
tree | 7fc68d7276407c85083990c08bcdd0c4d1fc265a /instruby.rb | |
parent | df632dc405b17a50b3bf5385d706c25c495de8fe (diff) |
merges r21364 and r21370 from trunk into ruby_1_9_1.
* instruby.rb: use installed libraries. [ruby-core:21006]
git-svn-id: svn+ssh://ci.ruby-lang.org/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 3c83dc3dc1..bf49706a70 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 |