class Build::Files::State
def self.dirty?(inputs, outputs)
def self.dirty?(inputs, outputs) if outputs.missing? # puts "Output file missing: #{output_state.missing.inspect}" return true end # If there are no inputs or no outputs, we are always clean: if inputs.empty? or outputs.empty? return false end oldest_output_time = outputs.oldest_time newest_input_time = inputs.newest_time if newest_input_time and oldest_output_time # We are dirty if any inputs are newer (bigger) than any outputs: return newest_input_time > oldest_output_time end return true end