summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-29 02:52:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-29 02:52:41 +0000
commit4e560cffd6266c08cb856d1b2c25f796522bcc9e (patch)
tree9737f5abbaf206fb2b24a83e9823a08c33b1eff7 /lib/mkmf.rb
parentbba6ae31371449a685f23bdd93f0f9a931e5eccd (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 63e89c2..47abd32 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -341,6 +341,12 @@ def create_makefile(target)
print "creating Makefile\n"
rm_f "conftest*"
STDOUT.flush
+ if target.rindex(%r!/!)
+ target = $'
+ target_prefix = "/"+$`
+ else
+ target_prefix = ""
+ end
if CONFIG["DLEXT"] == $OBJEXT
libs = $libs.split
for lib in libs
@@ -402,10 +408,10 @@ RUBY_SO_NAME = #{CONFIG["RUBY_SO_NAME"]}
DESTDIR =
prefix = $(DESTDIR)#{CONFIG["prefix"]}
exec_prefix = $(DESTDIR)#{CONFIG["exec_prefix"]}
-libdir = $(DESTDIR)#{$libdir}
-archdir = $(DESTDIR)#{$archdir}
-sitelibdir = $(DESTDIR)#{$sitelibdir}
-sitearchdir = $(DESTDIR)#{$sitearchdir}
+libdir = $(DESTDIR)#{$libdir}#{target_prefix}
+archdir = $(DESTDIR)#{$archdir}#{target_prefix}
+sitelibdir = $(DESTDIR)#{$sitelibdir}#{target_prefix}
+sitearchdir = $(DESTDIR)#{$sitearchdir}#{target_prefix}
#### End of system configuration section. ####