diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-03 11:43:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-03 11:43:03 +0200 |
commit | 17287b34a8090d381278c02b7bc6676669968099 (patch) | |
tree | 276fb40c1a06b0b3683b0dcad24e92f59cecce9f /build/target | |
parent | d4a6fb02ab5741aa41251653f0be3feb4594e553 (diff) |
Implement new default target logic, canonical directory name (empty value)
The logic is as follows: if we have an explicit current directory
target, then that's the default target. Otherwise, we take the
first target and use it as a prerequisite to create an implicit
current directory target, effectively making it the default
target via an alias. If there are no targets in this buildfile,
then we don't do anything.
Diffstat (limited to 'build/target')
-rw-r--r-- | build/target | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/target b/build/target index 0f5de4f..31a590d 100644 --- a/build/target +++ b/build/target @@ -135,10 +135,11 @@ namespace build find (const std::type_index& type, const path& dir, const std::string& name, - const std::string*& ext, + const std::string* ext, tracer& trace) const { - return find (key {&type, &dir, &name, &ext}, trace); + const std::string* e (ext); + return find (key {&type, &dir, &name, &e}, trace); } iterator begin () const {return map_.begin ();} @@ -156,7 +157,6 @@ namespace build }; extern target_set targets; - extern target* default_target; class target_type_map: public std::map< const char*, |