summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-23 17:40:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-23 17:40:36 +0000
commit6009002c58669b93da8aca43001444a10d8cdda6 (patch)
treec30574873e4b61090c744869eeda1c9daba618dd /instruby.rb
parent087671e87c9d4566f34544f4a7ccd32bd533d380 (diff)
* configure.in (LIBPATHFLAG): should escape $. [ruby-dev:18572]
* mkconfig.rb: never substute escaped $$. * instruby.rb: not install LIBRUBY_SO unless enable-shared. [ruby-dev:18569] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rw-r--r--instruby.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/instruby.rb b/instruby.rb
index 557a81b..48a0e4c 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -20,6 +20,7 @@ destdir ||= ''
$:.unshift CONFIG["srcdir"]+"/lib"
require 'ftools'
+require 'shellwords'
class Installer < File; end
class << Installer
@@ -66,6 +67,8 @@ archlibdir = destdir+CONFIG["archdir"]
sitelibdir = destdir+CONFIG["sitelibdir"]
sitearchlibdir = destdir+CONFIG["sitearchdir"]
mandir = destdir+CONFIG["mandir"] + "/man1"
+configure_args = Shellwords.shellwords(CONFIG["configure_args"])
+enable_shared = configure_args.include?('--enable-shared')
dll = CONFIG["LIBRUBY_SO"]
lib = CONFIG["LIBRUBY"]
arc = CONFIG["LIBRUBY_A"]
@@ -76,7 +79,7 @@ Installer.install ruby_install_name+exeext, bindir+"/"+ruby_install_name+exeext,
if rubyw_install_name and !rubyw_install_name.empty?
Installer.install rubyw_install_name+exeext, bindir, 0755, true
end
-Installer.install dll, bindir, 0755, true unless dll == lib
+Installer.install dll, bindir, 0755, true if enable_shared and dll != lib
Installer.install lib, libdir, 0555, true unless lib == arc
Installer.install arc, archlibdir, 0644, true
Installer.install "config.h", archlibdir, 0644, true
@@ -97,7 +100,7 @@ Dir.chdir CONFIG["srcdir"]
Installer.install "sample/irb.rb", "#{bindir}/irb", 0755, true
-Dir.glob("lib/*{.rb,help-message}") do |f|
+Dir.glob("lib/**/*{.rb,help-message}") do |f|
dir = File.dirname(f).sub!(/\Alib/, rubylibdir) || rubylibdir
Installer.makedirs dir, true unless File.directory? dir
Installer.install f, dir, 0644, true