summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-03 23:04:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-03 23:04:16 +0000
commitb7f6c8989af53f4d6c50271e2b29121b637b131a (patch)
treec7986ab91c65cd102449cc258fb966b95038b76c /ext/extmk.rb
parenta51e80459c2703d1906a4e1646de47def3550a09 (diff)
* ext/extmk.rb (extmake): should not modify $mflags for each
extentions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb')
-rw-r--r--ext/extmk.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index c63236c590..73cd6a1d5f 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -158,7 +158,7 @@ def extmake(target)
end
args = sysquote($mflags)
unless $destdir.to_s.empty? or $mflags.include?("DESTDIR")
- args << sysquote("DESTDIR=" + relative_from($destdir, "../"+prefix))
+ args += sysquote("DESTDIR=" + relative_from($destdir, "../"+prefix))
end
if $static
args += ["static"] unless $clean
@@ -429,7 +429,7 @@ SRC
$extpath.delete("$(topdir)")
$extflags = libpathflag($extpath) << " " << $extflags.strip
conf = [
- ['SETUP', $setup], [$enable_shared ? 'DLDOBJS' : 'EXTOBJS', $extobjs],
+ ['SETUP', $setup], [$enable_shared && !$force_static ? 'DLDOBJS' : 'EXTOBJS', $extobjs],
['EXTLIBS', $extlibs.join(' ')], ['EXTLDFLAGS', $extflags]
].map {|n, v|
"#{n}=#{v}" if v and !(v = v.strip).empty?
@@ -456,6 +456,9 @@ puts "making #{rubies.join(', ')}"
$stdout.flush
$mflags.concat(rubies)
+if $nmake == ?b
+ $mflags.collect {|flag| flag.sub!(/\A(?=\w+=)/, "-D")}
+end
system($make, *sysquote($mflags)) or exit($?.exitstatus)
#Local variables: