summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-17 13:57:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-17 13:57:52 +0000
commit351a5a5b8c58a7df192ec8e63b6e75267678594c (patch)
tree543fc23fd731e077ac003534b915c95fc44c856c /ext
parentc1445968f6e1322a9e5b76426834564d1a2bda89 (diff)
* ext/extmk.rb (extmake, parse_args): do not expand destdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 859538fe52..f14475fcab 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -156,6 +156,9 @@ def extmake(target)
return true
end
args = sysquote($mflags)
+ unless $destdir.to_s.empty? or $mflags.include?("DESTDIR")
+ args << sysquote("DESTDIR=" + relative_from($destdir, "../"+prefix))
+ end
if $static
args += ["static"] unless $clean
$extlist.push [$static, $target, File.basename($target), $preload]
@@ -265,10 +268,6 @@ def parse_args()
end
$continue = $mflags.set?(?k)
- if !$destdir.to_s.empty?
- $destdir = File.expand_path($destdir)
- $mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
- end
if $extout
$extout = '$(topdir)/'+$extout
$extout_prefix = $extout ? "$(extout)$(target_prefix)/" : ""
@@ -445,6 +444,9 @@ rubies = []
}
Dir.chdir ".."
+unless $destdir.to_s.empty?
+ $mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
+end
if !$extlist.empty? and $extupdate
rm_f(Config::CONFIG["LIBRUBY_SO"])
end