summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-28 17:25:31 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-28 17:25:31 +0000
commit923b55d35b560d11f13eea802a0f246a3c908ae6 (patch)
tree78f49d70fe2e0acd2a70e9a4c2fa062a858cf02f /instruby.rb
parentbb2030498a14f28686472fb93fe492192f48c606 (diff)
downloadbundler-923b55d35b560d11f13eea802a0f246a3c908ae6.tar.gz
* instruby.rb: fix install directory if destdir and compile_dir are
not in the same drive. * ext/extmk.rb: ditto. * win32/Makefile.sub, win32/README.win32, win32/configure.bat, win32/setup.mak: new configure scheme. use ``configure --prefix=dir'' instead of ``nmake DESTDIR=dir install''. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rw-r--r--instruby.rb24
1 files changed, 17 insertions, 7 deletions
diff --git a/instruby.rb b/instruby.rb
index c5a906a7c5..9e3d0d3fd5 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -71,19 +71,29 @@ def makedirs(dirs)
super(dirs, :mode => 0755, :verbose => true) unless dirs.empty?
end
+def join(dir1, dir2)
+ # same scheme as DESTDIR of lib/mkmf.rb
+ drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
+ if dir1.empty? || dir2.scan(drive).empty?
+ dir1 + dir2
+ else
+ dir1 + $'
+ end
+end
+
exeext = CONFIG["EXEEXT"]
ruby_install_name = CONFIG["ruby_install_name"]
rubyw_install_name = CONFIG["rubyw_install_name"]
version = CONFIG["ruby_version"]
-bindir = $destdir+CONFIG["bindir"]
-libdir = $destdir+CONFIG["libdir"]
-rubylibdir = $destdir+CONFIG["rubylibdir"]
-archlibdir = $destdir+CONFIG["archdir"]
-sitelibdir = $destdir+CONFIG["sitelibdir"]
-sitearchlibdir = $destdir+CONFIG["sitearchdir"]
-mandir = File.join($destdir+CONFIG["mandir"], "man")
+bindir = join($destdir, CONFIG["bindir"])
+libdir = join($destdir, CONFIG["libdir"])
+rubylibdir = join($destdir, CONFIG["rubylibdir"])
+archlibdir = join($destdir, CONFIG["archdir"])
+sitelibdir = join($destdir, CONFIG["sitelibdir"])
+sitearchlibdir = join($destdir, CONFIG["sitearchdir"])
+mandir = File.join(join($destdir, CONFIG["mandir"]), "man")
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
dll = CONFIG["LIBRUBY_SO"]