diff options
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 } |