aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-task.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-11-30 13:28:04 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-11-30 17:10:06 +0300
commitf3d3143aa67d1d038f5eee1103c2b783d54955c4 (patch)
tree85e2c5eedf24cfef718c724a7711a2260397cc4f /mod/mod-build-task.cxx
parent68aa933548c0fb927d0d03c522e49ba361c0e294 (diff)
Match build configuration names, targets and machine names as paths
Diffstat (limited to 'mod/mod-build-task.cxx')
-rw-r--r--mod/mod-build-task.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx
index 03c053a..d66e90c 100644
--- a/mod/mod-build-task.cxx
+++ b/mod/mod-build-task.cxx
@@ -154,10 +154,19 @@ handle (request& rq, response& rs)
{
for (auto& m: tqm.machines)
{
- if (path_match (c.machine_pattern, m.name) &&
- cfg_machines.insert (
- make_pair (c.name.c_str (), config_machine ({&c, &m}))).second)
- cfg_names.push_back (c.name.c_str ());
+ // The same story as in exclude() from build-config.cxx.
+ //
+ try
+ {
+ if (path_match (from_build_config_name (c.machine_pattern),
+ from_build_config_name (m.name),
+ dir_path () /* start */,
+ path_match_flags::match_absent) &&
+ cfg_machines.insert (
+ make_pair (c.name.c_str (), config_machine ({&c, &m}))).second)
+ cfg_names.push_back (c.name.c_str ());
+ }
+ catch (const invalid_path&) {}
}
}