aboutsummaryrefslogtreecommitdiff
path: root/build/algorithm
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-03-10 15:42:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-03-10 15:42:04 +0200
commit5925c11a1fe8b2e02b790dd40b031ae005d5b68f (patch)
tree14455da2f4b58d49542023ef0b415414b926d56f /build/algorithm
parent5807ff000225acf47064eb7f0be965bf1598faaa (diff)
Further operation implementation
Diffstat (limited to 'build/algorithm')
-rw-r--r--build/algorithm34
1 files changed, 19 insertions, 15 deletions
diff --git a/build/algorithm b/build/algorithm
index 82913ad..8ce35f8 100644
--- a/build/algorithm
+++ b/build/algorithm
@@ -6,6 +6,7 @@
#define BUILD_ALGORITHM
#include <build/target>
+#include <build/operation>
#include <build/timestamp>
namespace build
@@ -19,41 +20,44 @@ namespace build
target&
search (prerequisite&);
- // Match a rule to the target with ambiguity detection.
+ // Match a rule to the action/target with ambiguity detection.
//
void
- match (target&);
+ match (action, target&);
// The default prerequisite search and match implementation. It calls
// search() and then match() for each prerequisite in a loop.
//
void
- search_and_match (target&);
+ search_and_match (action, target&);
+ // Execute the action on target, assuming a rule has been matched
+ // and the recipe for this action has been set.
+ //
target_state
- update (target&);
+ execute (action, target&);
- // The default prerequisite update implementation. It calls update()
- // for each prerequisite in a loop. Returns target_state::updated
- // if any of them were updated and target_state::uptodate otherwise.
+ // The default prerequisite execute implementation. It calls execute()
+ // for each prerequisite in a loop. Returns target_state::changed
+ // if any of them were changed and target_state::unchanged otherwise.
//
target_state
- update_prerequisites (target&);
+ execute_prerequisites (action, target&);
- // A version of the above that also determines whether the target
- // needs updating based on the passed timestamp.
+ // A version of the above that also determines whether the action
+ // needs to be executed on the target based on the passed timestamp.
//
bool
- update_prerequisites (target&, const timestamp&);
+ execute_prerequisites (action, target&, const timestamp&);
// Another version of the above that does two extra things for the
- // caller: it determines whether the target needs updating based
- // on the passed timestamp and, if so, finds a prerequisite of the
- // specified type.
+ // caller: it determines whether the action needs to be executed on
+ // the target based on the passed timestamp and, if so, finds a
+ // prerequisite of the specified type (e.g., source file).
//
template <typename T>
T*
- update_prerequisites (target&, const timestamp&);
+ execute_prerequisites (action, target&, const timestamp&);
}
#include <build/algorithm.ixx>