summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-19 16:03:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-19 16:03:45 +0000
commit19310ddc6e0f6c1f5c7f2249cc61c057d333143f (patch)
tree852ea7925cbc26496cf17788a078ba68977eeba2 /ext/extmk.rb
parent23575b58ba3ba5f9fb9b473e9c3390e0dbecf94e (diff)
* 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
Diffstat (limited to 'ext/extmk.rb')
-rw-r--r--ext/extmk.rb12
1 files changed, 7 insertions, 5 deletions
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)