lib/blocks/compile.rb in bake-toolkit-2.12.2 vs lib/blocks/compile.rb in bake-toolkit-2.13.0
- old
+ new
@@ -30,14 +30,12 @@
adaptedSource = source.chomp(File.extname(source)).gsub(/\.\./, "##") + (Bake.options.prepro ? ".i" : @tcs[:COMPILER][:CPP][:OBJECT_FILE_ENDING])
return adaptedSource if File.is_absolute?source
File.join([@output_dir, adaptedSource])
end
- def maybe_needed?(source, object, type, dep_filename_conv)
- return false if Bake.options.linkOnly
- return false if Bake.options.prepro and type == ASM
- return true
+ def ignore?(type)
+ Bake.options.linkOnly or (Bake.options.prepro and type == ASM)
end
def needed?(source, object, type, dep_filename_conv)
return "because analyzer toolchain is configured" if Bake.options.analyze
return "because prepro was specified and source is no assembler file" if Bake.options.prepro
@@ -112,11 +110,11 @@
dep_filename = calcDepFile(object, type)
dep_filename_conv = calcDepFileConv(dep_filename) if type != :ASM
cmdLineCheck = false
cmdLineFile = calcCmdlineFile(object)
- return true unless maybe_needed?(source, object, type, dep_filename_conv)
+ return true if ignore?(type)
reason = needed?(source, object, type, dep_filename_conv)
if not reason
cmdLineCheck = true
# currently this returns always != nil
reason = config_changed?(cmdLineFile)
\ No newline at end of file