Do not calculate checksums for side-effect files - #92
This commit is contained in:
parent
f23fbcd6d1
commit
87a15b3868
@ -238,11 +238,18 @@ module Rscons
|
||||
# @param options [Hash] Optional arguments.
|
||||
# @option options [Boolean] :install
|
||||
# Whether the target is for an install operation.
|
||||
# @option options [Boolean] :side_effect
|
||||
# Whether the target is a side-effect file (no checksum will be stored).
|
||||
#
|
||||
# @return [void]
|
||||
def register_build(targets, command, deps, env, options = {})
|
||||
Array(targets).each do |target|
|
||||
target_checksum = Rscons.phony_target?(target) ? "" : calculate_checksum(target)
|
||||
target_checksum =
|
||||
if options[:side_effect] or Rscons.phony_target?(target)
|
||||
""
|
||||
else
|
||||
calculate_checksum(target)
|
||||
end
|
||||
@cache["targets"][get_cache_key(target)] = {
|
||||
"command" => Digest::MD5.hexdigest(command.inspect),
|
||||
"checksum" => target_checksum,
|
||||
|
@ -620,7 +620,7 @@ module Rscons
|
||||
# Register side-effect files as build targets so that a Cache
|
||||
# clean operation will remove them.
|
||||
builder.side_effects.each do |side_effect|
|
||||
Cache.instance.register_build(side_effect, nil, [], self)
|
||||
Cache.instance.register_build(side_effect, nil, [], self, side_effect: true)
|
||||
@side_effects.delete(side_effect)
|
||||
end
|
||||
@build_hooks[:post].each do |build_hook_block|
|
||||
|
Loading…
x
Reference in New Issue
Block a user