aboutsummaryrefslogtreecommitdiff
path: root/build/bd.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-12-11 07:35:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-12-11 07:35:54 +0200
commitf4ed3e569cb5ebae855ea5309bfc17aa6b35874a (patch)
tree58481ae13a9c5d1c4f6853b59bd66a059592074c /build/bd.cxx
parent5e9eb843f6ccadfb47fa603260783425da9e7805 (diff)
Initial implementation of dependency injection (g++ -M output)
Diffstat (limited to 'build/bd.cxx')
-rw-r--r--build/bd.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/build/bd.cxx b/build/bd.cxx
index e48de21..faae4c4 100644
--- a/build/bd.cxx
+++ b/build/bd.cxx
@@ -22,6 +22,10 @@ namespace build
bool
match (target& t)
{
+ // Because we match the target first and then prerequisites,
+ // any additional dependency information injected by the rule
+ // will be covered as well.
+ //
if (!t.recipe ())
{
for (auto ti (&t.type_id ());
@@ -44,7 +48,7 @@ namespace build
if (!t.recipe ())
{
- cerr << "error: no rule to build target " << t << endl;
+ cerr << "error: no rule to update target " << t << endl;
return false;
}
}
@@ -132,11 +136,7 @@ main (int argc, char* argv[])
cxx::cxx bd_cxx ("bd");
bd_cxx.path (path ("bd.cxx"));
- hxx target ("target");
- target.path (path ("target"));
-
bd_o.prerequisite (bd_cxx);
- bd_o.prerequisite (target);
//
//