aboutsummaryrefslogtreecommitdiff
path: root/build/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-19 16:10:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-19 16:10:03 +0200
commit8bd89cfca333e58f6990d7d168649dfc79878f31 (patch)
tree730bb9eec4fc5ddd086ed8465c4d7c0030db0d6b /build/target.cxx
parentb0524a0b18eec9d5e5c3f6ce30b6cecdd02a6306 (diff)
Add support for sourcing/including buildfiles, print, dir{} alias
Diffstat (limited to 'build/target.cxx')
-rw-r--r--build/target.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/build/target.cxx b/build/target.cxx
index 3852bc4..31a7f59 100644
--- a/build/target.cxx
+++ b/build/target.cxx
@@ -11,6 +11,11 @@ using namespace std;
namespace build
{
+ // target_type
+ //
+ const target_type*
+ resolve_target_type (const std::string name);
+
// target
//
ostream&
@@ -23,7 +28,12 @@ namespace build
string s (diagnostic_string (t.directory));
if (!s.empty ())
- os << s << path::traits::directory_separator;
+ {
+ os << s;
+
+ if (!t.name.empty ())
+ os << path::traits::directory_separator;
+ }
}
os << t.name;
@@ -79,7 +89,6 @@ namespace build
}
target_set targets;
-
target* default_target = nullptr;
target_type_map target_types;
@@ -103,4 +112,7 @@ namespace build
const target_type file::static_type {
typeid (file), "file", &path_target::static_type, &target_factory<file>};
+
+ const target_type dir::static_type {
+ typeid (dir), "dir", &target::static_type, &target_factory<dir>};
}