diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-04-02 12:49:10 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-04-02 12:49:10 +0200 |
commit | 0fb42229a5bf13170667701ad6cb468d58348007 (patch) | |
tree | d56760707760af718decb319ea17f91d1e98e51a /libbuild2/config | |
parent | 3d08bfb688cf08fb805c9431d43e65d58dcb8669 (diff) |
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.
Diffstat (limited to 'libbuild2/config')
-rw-r--r-- | libbuild2/config/host-config.cxx.in | 1 | ||||
-rw-r--r-- | libbuild2/config/init.cxx | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libbuild2/config/host-config.cxx.in b/libbuild2/config/host-config.cxx.in index 2e45c46..9e3e0c2 100644 --- a/libbuild2/config/host-config.cxx.in +++ b/libbuild2/config/host-config.cxx.in @@ -8,5 +8,6 @@ namespace build2 // This is a raw string literal, in case you are unfamiliar. // extern const char host_config[] = R"###($host_config$)###"; + extern const char build2_config[] = R"###($build2_config$)###"; } } 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 } |