fix Cache#up_to_date?() checking dependency subset - initial rebuilding only when necessary working
This commit is contained in:
parent
0bf71ae4d1
commit
833cc5915e
@ -60,7 +60,8 @@ module Rscons
|
||||
# command line used to build target must be identical
|
||||
return false unless @cache[target][:command] == command
|
||||
# all dependencies passed in must exist in cache (but cache may have more)
|
||||
return false unless (Set.new(deps) - Set.new(@cache[target][:deps])).empty?
|
||||
cached_deps = @cache[target][:deps].map { |dc| dc[:fname] }
|
||||
return false unless (Set.new(deps) - Set.new(cached_deps)).empty?
|
||||
# all cached dependencies must have their checksums match
|
||||
@cache[target][:deps].map do |dep_cache|
|
||||
dep_cache[:checksum] == lookup_checksum(dep_cache[:fname])
|
||||
|
@ -79,7 +79,7 @@ describe Rscons do
|
||||
`./header`.should == "The value is 5\n"
|
||||
end
|
||||
|
||||
xit 'does not rebuild a C module when its dependencies have not changed' do
|
||||
it 'does not rebuild a C module when its dependencies have not changed' do
|
||||
lines = test_dir('header')
|
||||
`./header`.should == "The value is 2\n"
|
||||
lines.should == [
|
||||
|
Loading…
x
Reference in New Issue
Block a user