diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-19 16:03:45 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-19 16:03:45 +0000 |
commit | 945252987ee244b88a797d20dc1b88687a0de7ac (patch) | |
tree | 137a9ec4eaea9e96b27db05176c0a81d07096e49 /ext/extmk.rb | |
parent | 2d93b161c52f6d3b327cbda71ceb44303fefacb0 (diff) | |
download | ruby-945252987ee244b88a797d20dc1b88687a0de7ac.tar.gz ruby-945252987ee244b88a797d20dc1b88687a0de7ac.tar.xz ruby-945252987ee244b88a797d20dc1b88687a0de7ac.zip |
* ext/extmk.rb: Borland make needs also -D flags to override variables
in Makefile.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb')
-rw-r--r-- | ext/extmk.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb index fe5080de7..290fef9d5 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) |