From 19310ddc6e0f6c1f5c7f2249cc61c057d333143f Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 19 Oct 2006 16:03:45 +0000 Subject: * ext/extmk.rb: Borland make needs also -D flags to override variables in Makefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ext/extmk.rb') diff --git a/ext/extmk.rb b/ext/extmk.rb index 99c2d6509e..ff1b184a1f 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) -- cgit v1.2.3