Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 5548

Show
Ignore:
Timestamp:
09/02/10 20:19:34 (1 year ago)
Author:
mwarning
Message:

fixes #1980 :: Patch for fixing bob.rb on Windows; thanks doob

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/script/bob.rb

    r5508 r5548  
    2222HAIKU = RUBY_PLATFORM =~ /haiku/ ? true : false 
    2323SOLARIS = RUBY_PLATFORM =~ /solaris/ ? true : false 
    24 WINDOWS = RUBY_PLATFORM =~ /windows/ ? true : false 
     24WINDOWS = RUBY_PLATFORM =~ /windows/ || RUBY_PLATFORM =~ /mingw/ ? true : false 
    2525 
    2626class Functor 
     
    200200    end 
    201201     
    202     def addToLib (obj
     202    def addToLib (obj, append_objs_path = true
    203203        eol = "\r\n" if WINDOWS 
    204204        eol = " " unless WINDOWS 
    205205         
    206         file = File.join(@args.objs, obj) 
     206        file = File.join(@args.objs, obj) if append_objs_path 
     207        file = obj unless append_objs_path 
    207208         
    208209        @libs << file << eol if File.exists?(file) 
     
    238239    def check_command (cmd, line) 
    239240        if $?.to_i != 0 
    240             raise "#{cmd} returned #{$?.to_int/256} exit status\nline was: #{line}" 
     241            raise "#{cmd} returned #{$?.to_i/256} exit status\nline was: #{line}" 
    241242        end 
    242243    end 
     
    256257             
    257258            if !@args.quick || isOverdue(file, temp) 
    258                 exec(cmd + tmp + " " + file) 
     259                exec(cmd + temp + " " + file) 
    259260            end 
    260261             
     
    263264 
    264265        dmd = "dmd -c -I#{@args.root}/tango/core -I#{@args.root} -I#{@args.root}/tango/core/vendor #{@args.flags} -of#{@args.objs}/"; 
    265         libs("-c -n -p256\n" + @args.lib) 
     266        @libs << "-c -n -p256\n#{@args.lib}\n" 
    266267         
    267268        exclude("tango/core/rt/compiler/dmd/posix") 
     
    273274         
    274275        scan(".c") do |file| 
    275             compile("dmc -c -mn -6 -r -o", file) 
    276         end 
    277          
    278         addToLib(@args.root + "/tango/core/rt/compiler/dmd/minit.obj") if @args.core 
     276            compile("dmc -c -mn -6 -r -o#{@args.objs}/", file) 
     277        end         
     278         
     279        addToLib(@args.root + "/tango/core/rt/compiler/dmd/minit.obj", false) if @args.core 
    279280         
    280281        File.open("tango.lsp", "w+") do |file| 
     
    283284         
    284285        exec("lib @tango.lsp") 
    285         #exec("cmd /q /c del tango.lsp *.obj") 
    286286        exec("cmd /q /c del tango.lsp") 
    287287