aboutsummaryrefslogtreecommitdiff
path: root/build/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-03-12 15:43:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-03-12 15:43:17 +0200
commitcf6b3e34b59ad120111e0c1ead779bbb3a70c38d (patch)
tree424e9def98c65d9080e72a69064334c6716fb82b /build/target.cxx
parent5925c11a1fe8b2e02b790dd40b031ae005d5b68f (diff)
Implement clean operation
Diffstat (limited to 'build/target.cxx')
-rw-r--r--build/target.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/build/target.cxx b/build/target.cxx
index 5cf131f..15d57ca 100644
--- a/build/target.cxx
+++ b/build/target.cxx
@@ -7,16 +7,29 @@
#include <build/scope>
#include <build/search>
#include <build/context>
+#include <build/algorithm> // execute_prerequisites()
#include <build/diagnostics>
using namespace std;
namespace build
{
- // target
+ // recipe
//
- const recipe target::empty_recipe_;
+ const recipe empty_recipe;
+ const recipe noop_recipe (&noop_recipe_function);
+ const recipe default_recipe (
+ static_cast<recipe_function*> (&execute_prerequisites));
+
+ target_state
+ noop_recipe_function (action, target&)
+ {
+ assert (false); // We shouldn't be called, see target::recipe().
+ return target_state::unchanged;
+ }
+ // target
+ //
ostream&
operator<< (ostream& os, const target& t)
{