aboutsummaryrefslogtreecommitdiff
path: root/build/config
diff options
context:
space:
mode:
Diffstat (limited to 'build/config')
-rw-r--r--build/config/module.cxx6
-rw-r--r--build/config/operation.cxx14
2 files changed, 12 insertions, 8 deletions
diff --git a/build/config/module.cxx b/build/config/module.cxx
index 5ecf2d3..74bcec4 100644
--- a/build/config/module.cxx
+++ b/build/config/module.cxx
@@ -42,7 +42,7 @@ namespace build
return;
}
- const dir_path& out_root (r.path ());
+ const dir_path& out_root (r.out_path ());
level4 ([&]{trace << "for " << out_root;});
// Register meta-operations.
@@ -52,7 +52,11 @@ namespace build
// Register alias and fallback rule for the configure meta-operation.
//
+ global_scope->rules.insert<file> (
+ configure_id, 0, "file", file_rule::instance);
+
r.rules.insert<alias> (configure_id, 0, "alias", alias_rule::instance);
+ r.rules.insert<file> (configure_id, 0, "", fallback_rule::instance);
r.rules.insert<target> (configure_id, 0, "", fallback_rule::instance);
// Load config.build if one exists.
diff --git a/build/config/operation.cxx b/build/config/operation.cxx
index b1c6239..424fd46 100644
--- a/build/config/operation.cxx
+++ b/build/config/operation.cxx
@@ -65,7 +65,7 @@ namespace build
static void
save_config (scope& root)
{
- const dir_path& out_root (root.path ());
+ const dir_path& out_root (root.out_path ());
path f (out_root / config_file);
text << (verb ? "config::save_config " : "save ") << f;
@@ -134,7 +134,7 @@ namespace build
{
tracer trace ("configure_project");
- const dir_path& out_root (root.path ());
+ const dir_path& out_root (root.out_path ());
const dir_path& src_root (root.src_path ());
// Make sure the directories exist.
@@ -179,7 +179,7 @@ namespace build
// @@ Strictly speaking we need to check whether the config
// module was loaded for this subproject.
//
- if (nroot.path () != out_nroot) // This subproject was not loaded.
+ if (nroot.out_path () != out_nroot) // This subproject not loaded.
continue;
configure_project (a, nroot);
@@ -273,7 +273,7 @@ namespace build
action_targets& ts)
{
tracer trace ("disfigure_search");
- level5 ([&]{trace << "collecting " << root.path ();});
+ level5 ([&]{trace << "collecting " << root.out_path ();});
ts.push_back (&root);
}
@@ -287,7 +287,7 @@ namespace build
bool m (false); // Keep track of whether we actually did anything.
- const dir_path& out_root (root.path ());
+ const dir_path& out_root (root.out_path ());
const dir_path& src_root (root.src_path ());
// Disfigure subprojects. Since we don't load buildfiles during
@@ -313,7 +313,7 @@ namespace build
if (!val)
val = is_src_root (out_nroot) ? out_nroot : (src_root / pd);
- nroot.src_path_ = &as<dir_path> (val);
+ setup_root (nroot);
bootstrap_src (nroot);
@@ -398,7 +398,7 @@ namespace build
//
target& t (
targets.insert (
- dir::static_type, root.path (), "", nullptr, trace).first);
+ dir::static_type, root.out_path (), "", nullptr, trace).first);
if (!quiet)
info << diag_done (a, t);