Changeset 1008

Show
Ignore:
Timestamp:
04/18/08 02:10:02 (3 months ago)
Author:
eweaver
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable_1-2

    • Property bzr:revision-id:v3-trunk0 changed from
      814 luislavena@gmail.com-20080331074345-8r7ghwi05bwwqz7f
      815 luislavena@gmail.com-20080331075048-t48wb12km03z1k7d
      816 luislavena@gmail.com-20080331081757-x3m83b2w24vlgbhz
      817 luislavena@gmail.com-20080406001418-f6mxbnyordlkvosz
      to
      814 luislavena@gmail.com-20080331074345-8r7ghwi05bwwqz7f
      815 luislavena@gmail.com-20080331075048-t48wb12km03z1k7d
      816 luislavena@gmail.com-20080331081757-x3m83b2w24vlgbhz
      817 luislavena@gmail.com-20080406001418-f6mxbnyordlkvosz
      822 luislavena@gmail.com-20080418001345-y6hgwpxkfc5qml6v
    • Property bzr:revision-info changed from
      timestamp: 2008-04-05 21:14:18.358999968 -0300
      committer: Luis Lavena <luislavena@gmail.com>
      properties:
      branch-nick: stable_1-2
      to
      timestamp: 2008-04-17 21:13:45.437000036 -0300
      committer: Luis Lavena <luislavena@gmail.com>
      properties:
      branch-nick: stable_1-2
  • branches/stable_1-2/projects/mongrel_service/tools/freebasic.rb

    r537 r1008  
    6464      @options = {} 
    6565       
    66       instance_eval &block 
     66      instance_eval(&block) if block_given? 
    6767       
    6868      do_cleanup 
     
    9191      def lib(lib_name) 
    9292        @type = :lib 
    93         @output_name = lib_name 
     93        @output_name = "#{lib_name}" 
    9494        @real_file_name = "lib#{lib_name}.a" 
    9595      end 
     
    198198      # compiled_form("test.bas") => "test.o" 
    199199      def compiled_form(src) 
    200         src.ext({ ".bas" => "o", ".rc" => "obj" }[File.extname(src)]) 
     200        unless src.nil? 
     201          src.ext({ ".bas" => "o", ".rc" => "obj" }[File.extname(src)]) 
     202        end 
    201203      end 
    202204       
     
    208210        cmdline = [] 
    209211        cmdline << "fbc" 
     212        cmdline << "-w pedantic" if (@options.has_key?(:pedantic) && @options[:pedantic] == true) 
    210213        cmdline << "-g" if (@options.has_key?(:debug) && @options[:debug] == true) 
    211214        cmdline << "-#{@options[:errorchecking].to_s}" if @options.has_key?(:errorchecking) 
     215        cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true) 
    212216        cmdline << "-profile" if (@options.has_key?(:profile) && @options[:profile] == true) 
    213         cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true) 
    214         cmdline << "-w pedantic" if (@options.has_key?(:pedantic) && @options[:pedantic] == true) 
    215217        cmdline << "-c #{source}" 
    216218        cmdline << "-o #{target}" 
     
    225227        cmdline << "fbc" 
    226228        cmdline << "-g" if (@options.has_key?(:debug) && @options[:debug] == true) 
     229        cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true) 
    227230        cmdline << "-profile" if (@options.has_key?(:profile) && @options[:profile] == true) 
    228         cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true) 
    229231        cmdline << "-#{@type.to_s}" unless @type == :executable 
    230232        cmdline << "-x #{target}" 
     
    242244        task :clobber do 
    243245          # remove compiled and linked file 
    244           rm compiled_project_file rescue nil #unless @type == :lib 
    245           rm File.join(@build_path, @complement_file) rescue nil if @type == :dylib 
     246          rm compiled_project_file rescue nil if File.exist?(compiled_project_file) 
     247          if @type == :dylib 
     248            rm File.join(@build_path, @complement_file) rescue nil if File.exist?(File.join(@build_path, @complement_file)) 
     249          end 
    246250           
    247251          # remove main file 
    248           rm compiled_form(@main_file) rescue nil 
     252          unless @main_file.nil? || !File.exists?(compiled_form(@main_file)) 
     253            rm compiled_form(@main_file) rescue nil 
     254          end 
    249255           
    250256          # now the sources files 
     
    256262              unless CLOBBER.include?(target) 
    257263                CLOBBER.include(target) 
    258                 rm target rescue nil 
     264                rm target rescue nil if File.exist?(target) 
    259265              end 
    260266            end