Changeset 1008
- Timestamp:
- 04/18/08 02:10:02 (3 months ago)
- Files:
-
- branches/stable_1-2 (modified) (2 props)
- branches/stable_1-2/projects/mongrel_service/tools/freebasic.rb (modified) (7 diffs)
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
- Property bzr:revision-id:v3-trunk0 changed from
branches/stable_1-2/projects/mongrel_service/tools/freebasic.rb
r537 r1008 64 64 @options = {} 65 65 66 instance_eval &block66 instance_eval(&block) if block_given? 67 67 68 68 do_cleanup … … 91 91 def lib(lib_name) 92 92 @type = :lib 93 @output_name = lib_name93 @output_name = "#{lib_name}" 94 94 @real_file_name = "lib#{lib_name}.a" 95 95 end … … 198 198 # compiled_form("test.bas") => "test.o" 199 199 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 201 203 end 202 204 … … 208 210 cmdline = [] 209 211 cmdline << "fbc" 212 cmdline << "-w pedantic" if (@options.has_key?(:pedantic) && @options[:pedantic] == true) 210 213 cmdline << "-g" if (@options.has_key?(:debug) && @options[:debug] == true) 211 214 cmdline << "-#{@options[:errorchecking].to_s}" if @options.has_key?(:errorchecking) 215 cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true) 212 216 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)215 217 cmdline << "-c #{source}" 216 218 cmdline << "-o #{target}" … … 225 227 cmdline << "fbc" 226 228 cmdline << "-g" if (@options.has_key?(:debug) && @options[:debug] == true) 229 cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true) 227 230 cmdline << "-profile" if (@options.has_key?(:profile) && @options[:profile] == true) 228 cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true)229 231 cmdline << "-#{@type.to_s}" unless @type == :executable 230 232 cmdline << "-x #{target}" … … 242 244 task :clobber do 243 245 # 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 246 250 247 251 # 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 249 255 250 256 # now the sources files … … 256 262 unless CLOBBER.include?(target) 257 263 CLOBBER.include(target) 258 rm target rescue nil 264 rm target rescue nil if File.exist?(target) 259 265 end 260 266 end
