aboutsummaryrefslogtreecommitdiff
path: root/build/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-23 16:09:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-23 16:09:27 +0200
commit0bd954eabb236bc9530220ffbc076967d35e33f4 (patch)
tree320072dadaa23ffc378e0e1a5ec99ae406e48f55 /build/target.cxx
parentfefe0657f29b8db782f7a722dd46b074b991cf08 (diff)
Don't create new target for alias/action/dir prerequisite
Diffstat (limited to 'build/target.cxx')
-rw-r--r--build/target.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/build/target.cxx b/build/target.cxx
index 197770c..50a7cc6 100644
--- a/build/target.cxx
+++ b/build/target.cxx
@@ -150,6 +150,21 @@ namespace build
return nullptr;
}
+ // dir target
+ //
+ static target*
+ search_alias (prerequisite& p)
+ {
+ // For an alias/action we don't want to silently create a target
+ // since it will do nothing and it most likely not what the author
+ // intended.
+ //
+ if (target* t = search_existing_target (p))
+ return t;
+
+ fail << "no explicit target for prerequisite " << p;
+ }
+
// type info
//
@@ -195,6 +210,6 @@ namespace build
"dir",
&target::static_type,
&target_factory<dir>,
- target::static_type.search
+ &search_alias
};
}