From 0fb42229a5bf13170667701ad6cb468d58348007 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Apr 2020 12:49:10 +0200 Subject: Fix ~host config to only contain cc and bin modules configuration Also add ~build2 that contains everything (except config.dist.*) to be used for build system modules. --- libbuild2/config/init.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libbuild2/config/init.cxx') diff --git a/libbuild2/config/init.cxx b/libbuild2/config/init.cxx index 75193bb..f0f4841 100644 --- a/libbuild2/config/init.cxx +++ b/libbuild2/config/init.cxx @@ -142,8 +142,11 @@ namespace build2 return true; // Initialize first (load config.build). } + // host-config.cxx.in + // #ifndef BUILD2_BOOTSTRAP - extern const char host_config[]; // host-config.cxx.in + extern const char host_config[]; + extern const char build2_config[]; #endif bool @@ -251,12 +254,12 @@ namespace build2 if (s[0] != '~') load_config_file (f, l); - else if (s == "~host") + else if (s == "~host" || s == "~build2") { #ifdef BUILD2_BOOTSTRAP assert (false); #else - istringstream is (host_config); + istringstream is (s[1] == 'h' ? host_config : build2_config); load_config (is, path_name (s), l); #endif } -- cgit v1.1