diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-09-20 09:03:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-09-20 09:03:44 +0200 |
commit | 77bef9b64857b1d2ae96dafc2f531cadb374f561 (patch) | |
tree | f246f3ebc62116263521d87b7d74dba7efc2f0ae /libbuild2/test | |
parent | b43546939b21f6c8d3e69d4ab1e44f08c0756481 (diff) |
Fix issue with fallback rule priority in dist module
While at it, also remove workarounds for the same issue in the config and
test modules.
Diffstat (limited to 'libbuild2/test')
-rw-r--r-- | libbuild2/test/init.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libbuild2/test/init.cxx b/libbuild2/test/init.cxx index b7cf25f..32548f4 100644 --- a/libbuild2/test/init.cxx +++ b/libbuild2/test/init.cxx @@ -23,6 +23,8 @@ namespace build2 { namespace test { + static const file_rule file_rule_ (true /* check_type */); + void boot (scope& rs, const location&, module_boot_extra& extra) { @@ -300,18 +302,18 @@ namespace build2 { default_rule& dr (m); - // Note: register for mtime_target to take priority over the fallback - // rule below. - // - rs.insert_rule<target> (perform_test_id, "test", dr); - rs.insert_rule<mtime_target> (perform_test_id, "test", dr); - rs.insert_rule<alias> (perform_test_id, "test", dr); + rs.insert_rule<target> (perform_test_id, "test", dr); + rs.insert_rule<alias> (perform_test_id, "test", dr); // Register the fallback file rule for the update-for-test operation, // similar to update. // - rs.global_scope ().insert_rule<mtime_target> ( - perform_test_id, "test.file", file_rule::instance); + // Note: use target instead of anything more specific (such as + // mtime_target) in order not to take precedence over the "test" rule + // above. + // + rs.global_scope ().insert_rule<target> ( + perform_test_id, "test.file", file_rule_); } return true; |