aboutsummaryrefslogtreecommitdiff
path: root/build/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-26 17:25:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-26 17:25:10 +0200
commit18568ff0ff3dce89d694b494c5dfc9a32e63c9e6 (patch)
treecd36895fdab3b30b8b61fcc3e12f8a92bb292203 /build/rule.cxx
parent95239b7c5404965d4f5ef997b5b75bf542a25192 (diff)
Part two of dependency injection with auto-generation support
Diffstat (limited to 'build/rule.cxx')
-rw-r--r--build/rule.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/build/rule.cxx b/build/rule.cxx
index baed3ba..34aae9d 100644
--- a/build/rule.cxx
+++ b/build/rule.cxx
@@ -39,7 +39,7 @@ namespace build
// are not doing anything for this action so not checking if the file
// exists seems harmless. What about, say, configure_update? Again,
// whether we match or not, there is nothing to be done for this
- // action. And who knows, maybe the file doesn't exist during
+ // action. And, who knows, maybe the file doesn't exist during
// configure_update but will magically appear during perform_update.
// So the overall guideline seems to be this: if we don't do anything
// for the action (other than performing it on the prerequisites),
@@ -160,10 +160,6 @@ namespace build
recipe fsdir_rule::
apply (action a, target& t, void*) const
{
- // Inject dependency on the parent directory.
- //
- inject_parent_fsdir (a, t);
-
switch (a.operation ())
{
// For default, we don't do anything other than letting our
@@ -171,6 +167,11 @@ namespace build
//
case default_id:
case update_id:
+ // Inject dependency on the parent directory. Note that we
+ // don't do it for clean since we shouldn't be removing it.
+ //
+ inject_parent_fsdir (a, t);
+
search_and_match (a, t);
break;
// For clean, ignore prerequisites that are not in the same or a