From 96117996a0996df65e02984d17f396687f184f17 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 19 Oct 2006 16:03:45 +0000 Subject: [PATCH] * 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 --- ext/extmk.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ext/extmk.rb b/ext/extmk.rb index fe5080de73..290fef9d56 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -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)