From 8e0e8edb727a5367d991880b033eb13060f4c8eb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 26 Aug 2019 07:34:15 +0200 Subject: Make target types project-wide --- build2/bin/init.cxx | 69 +++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'build2/bin/init.cxx') diff --git a/build2/bin/init.cxx b/build2/bin/init.cxx index 4e80834..54bd84a 100644 --- a/build2/bin/init.cxx +++ b/build2/bin/init.cxx @@ -402,7 +402,7 @@ namespace build2 scope& bs, const location& loc, unique_ptr&, - bool, + bool first, bool, const variable_map& hints) { @@ -421,41 +421,41 @@ namespace build2 // Register target types and configure their default "installability". // bool install_loaded (cast_false (rs["install.loaded"])); - { using namespace install; - auto& t (bs.target_types); - - t.insert (); - t.insert (); - t.insert (); - t.insert (); - - t.insert (); - t.insert (); - t.insert (); - t.insert (); - - t.insert (); - t.insert (); - t.insert (); - t.insert (); - - t.insert (); - t.insert (); - t.insert (); - t.insert (); - - t.insert (); - t.insert (); - t.insert (); - - // Register the def{} target type. Note that we do it here since it is - // input and can be specified unconditionally (i.e., not only when - // building for Windows). - // - t.insert (); + if (first) + { + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + + rs.insert_target_type (); + rs.insert_target_type (); + rs.insert_target_type (); + + // Register the def{} target type. Note that we do it here since it + // is input and can be specified unconditionally (i.e., not only + // when building for Windows). + // + rs.insert_target_type (); + } // Note: libu*{} members are not installable. // @@ -494,7 +494,8 @@ namespace build2 { // Import library. // - t.insert (); + if (first) + rs.insert_target_type (); if (install_loaded) { -- cgit v1.1