From 8bd89cfca333e58f6990d7d168649dfc79878f31 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 19 Feb 2015 16:10:03 +0200 Subject: Add support for sourcing/including buildfiles, print, dir{} alias --- build/target.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'build/target.cxx') 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}; + + const target_type dir::static_type { + typeid (dir), "dir", &target::static_type, &target_factory}; } -- cgit v1.1