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 | ebe08e51bdc976d0cd21ade32c280fb2860518a5 (patch) | |
| tree | 852ea7925cbc26496cf17788a078ba68977eeba2 /ext | |
| parent | b74e36be76dec3e25ed7168f3c6bf4b19b7b010c (diff) | |
| download | ruby-ebe08e51bdc976d0cd21ade32c280fb2860518a5.tar.gz ruby-ebe08e51bdc976d0cd21ade32c280fb2860518a5.tar.xz ruby-ebe08e51bdc976d0cd21ade32c280fb2860518a5.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/branches/ruby_1_8@11192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -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 99c2d6509..ff1b184a1 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) |
