diff options
Diffstat (limited to '')
-rw-r--r-- | src/target.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/target.cpp b/src/target.cpp index 1846044..4f9dd77 100644 --- a/src/target.cpp +++ b/src/target.cpp | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "context.h" | 7 | #include "context.h" |
8 | #include "profile.h" | 8 | #include "profile.h" |
9 | #include "view.h" | 9 | #include "view.h" |
10 | #include "cache.h" | ||
10 | 11 | ||
11 | #include <bu/membuf.h> | 12 | #include <bu/membuf.h> |
12 | #include <bu/formatter.h> | 13 | #include <bu/formatter.h> |
@@ -76,6 +77,19 @@ const StrList &Target::getRequiresList() const | |||
76 | return lsRequires; | 77 | return lsRequires; |
77 | } | 78 | } |
78 | 79 | ||
80 | void Target::gatherRequires( Runner &r ) | ||
81 | { | ||
82 | Cache &c = Cache::getInstance(); | ||
83 | try | ||
84 | { | ||
85 | lsRequires = c.getRequires( lsOutput.first() ); | ||
86 | } | ||
87 | catch( Bu::HashException &e ) | ||
88 | { | ||
89 | buildRequires( r ); | ||
90 | } | ||
91 | } | ||
92 | |||
79 | void Target::buildRequires( Runner &r ) | 93 | void Target::buildRequires( Runner &r ) |
80 | { | 94 | { |
81 | r.getContext().getView()->buildRequires( *this ); | 95 | r.getContext().getView()->buildRequires( *this ); |
@@ -108,6 +122,9 @@ void Target::buildRequires( Runner &r ) | |||
108 | } | 122 | } |
109 | } | 123 | } |
110 | r.getContext().popScope(); | 124 | r.getContext().popScope(); |
125 | |||
126 | Cache &c = Cache::getInstance(); | ||
127 | c.setRequires( lsOutput.first(), lsRequires ); | ||
111 | } | 128 | } |
112 | 129 | ||
113 | void Target::addOutput( const Bu::FString &sOutput ) | 130 | void Target::addOutput( const Bu::FString &sOutput ) |