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/b.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'build/b.cxx') diff --git a/build/b.cxx b/build/b.cxx index 3d19131..c9322a0 100644 --- a/build/b.cxx +++ b/build/b.cxx @@ -154,6 +154,7 @@ main (int argc, char* argv[]) // Register target types. // target_types.insert (file::static_type); + target_types.insert (dir::static_type); target_types.insert (exe::static_type); target_types.insert (obj::static_type); @@ -225,7 +226,7 @@ main (int argc, char* argv[]) // path bf ("buildfile"); - ifstream ifs (bf.string ().c_str ()); + ifstream ifs (bf.string ()); if (!ifs.is_open ()) fail << "unable to open " << bf; @@ -251,8 +252,11 @@ main (int argc, char* argv[]) cxx::compile cxx_compile; rules[typeid (obj)].emplace ("cxx.gnu.compile", cxx_compile); - default_path_rule path_exists; - rules[typeid (path_target)].emplace ("", path_exists); + dir_rule dir_r; + rules[typeid (dir)].emplace ("", dir_r); + + path_rule path_r; + rules[typeid (path_target)].emplace ("", path_r); // Build. // -- cgit v1.1