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
commitb567351affbe7f6279038db8d45da73f13f5ea77 (patch)
treed7a4f13b3ad04107f74af1fc69ffc7077a5e0b19 /ext
parent4afc07a66637ab4df52f1b4672adf51b56b6c1eb (diff)
* ext/extmk.rb (extmake, parse_args): do not expand destdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@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 aa6200e370..2342b0ce37 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]
@@ -266,10 +269,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)/" : ""
@@ -446,6 +445,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