* ext/extmk.rb: Borland make needs also -D flags to override variables

in Makefile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2006-10-19 16:03:45 +00:00
parent bbb0bf8049
commit 96117996a0
1 changed files with 7 additions and 5 deletions

View File

@ -503,12 +503,14 @@ $mflags.concat(rubies)
if $nmake == ?b
unless (vars = $mflags.grep(/\A\w+=/n)).empty?
open(mkf = "libruby.mk", "wb") do |f|
f.puts("!include Makefile")
f.puts(*vars)
f.puts("PRE_LIBRUBY_UPDATE = del #{mkf}")
open(mkf = "libruby.mk", "wb") do |tmf|
tmf.puts("!include Makefile")
tmf.puts
tmf.puts(*vars.map {|v| v.sub(/=/, " = ")})
tmf.puts("PRE_LIBRUBY_UPDATE = del #{mkf}")
end
$mflags.delete_if(&/\A\w+=/n.method(:=~)).unshift("-f#{mkf}")
$mflags.unshift("-f#{mkf}")
vars.each {|flag| flag.sub!(/\A/, "-D")}
end
end
system($make, *sysquote($mflags)) or exit($?.exitstatus)