aboutsummaryrefslogtreecommitdiff
path: root/mod/build-config-module.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-03-18 22:17:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-03-27 17:28:44 +0300
commit35359f038f571dc46de3d14af72a2bc911fb0a24 (patch)
treede3e89d678e78b9efc4d395274fd7ccc68f4a213 /mod/build-config-module.hxx
parent8ad672cc7211952716ffe1fbf76c179b4f1149e3 (diff)
Implement brep-monitor
Diffstat (limited to 'mod/build-config-module.hxx')
-rw-r--r--mod/build-config-module.hxx40
1 files changed, 13 insertions, 27 deletions
diff --git a/mod/build-config-module.hxx b/mod/build-config-module.hxx
index 4b23056..04fd5b1 100644
--- a/mod/build-config-module.hxx
+++ b/mod/build-config-module.hxx
@@ -5,7 +5,6 @@
#define MOD_BUILD_CONFIG_MODULE_HXX
#include <map>
-#include <algorithm> // find()
#include <libbutl/utility.mxx> // compare_c_string
@@ -16,8 +15,8 @@
#include <libbrep/types.hxx>
#include <libbrep/utility.hxx>
-#include <mod/module.hxx>
-#include <mod/options.hxx>
+#include <mod/build-config.hxx>
+#include <mod/module-options.hxx>
// Base class for modules that utilize the build controller configuration.
//
@@ -39,17 +38,18 @@ namespace brep
void
init (const options::build&);
- // Return true if the specified build configuration is excluded by a
- // package based on its underlying build class set, build class
- // expressions, and build constraints, potentially extending the
- // underlying set with the special classes. Set the exclusion reason if
- // requested.
- //
bool
- exclude (const small_vector<bpkg::build_class_expr, 1>&,
- const vector<bpkg::build_constraint>&,
- const bbot::build_config&,
- string* reason = nullptr) const;
+ exclude (const small_vector<bpkg::build_class_expr, 1>& exprs,
+ const vector<bpkg::build_constraint>& constrs,
+ const bbot::build_config& cfg,
+ string* reason = nullptr) const
+ {
+ return brep::exclude (exprs,
+ constrs,
+ cfg,
+ build_conf_->class_inheritance_map,
+ reason);
+ }
// Check if the configuration belongs to the specified class.
//
@@ -62,20 +62,6 @@ namespace brep
return belongs (cfg, cls.c_str ());
}
- // Convert dash-separated components (target, build configuration name,
- // machine name) or a pattern thereof into a path, replacing dashes with
- // slashes (directory separators), `**` with `*/**/*`, and appending the
- // trailing slash for a subsequent match using the path_match()
- // functionality (the idea here is for `linux**` to match `linux-gcc`
- // which is quite natural to expect). Throw invalid_path if the resulting
- // path is invalid.
- //
- // Note that the match_absent path match flag must be used for the above
- // `**` transformation to work.
- //
- static path
- dash_components_to_path (const string&);
-
// Configuration/toolchain combination that, in particular, can be used as
// a set value.
//