aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dist
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-09-20 09:03:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-09-20 09:03:44 +0200
commit77bef9b64857b1d2ae96dafc2f531cadb374f561 (patch)
treef246f3ebc62116263521d87b7d74dba7efc2f0ae /libbuild2/dist
parentb43546939b21f6c8d3e69d4ab1e44f08c0756481 (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/dist')
-rw-r--r--libbuild2/dist/init.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/libbuild2/dist/init.cxx b/libbuild2/dist/init.cxx
index 2a25992..48a3e15 100644
--- a/libbuild2/dist/init.cxx
+++ b/libbuild2/dist/init.cxx
@@ -22,6 +22,7 @@ namespace build2
namespace dist
{
static const rule rule_;
+ static const file_rule file_rule_ (true /* check_type */);
void
boot (scope& rs, const location&, module_boot_extra& extra)
@@ -222,10 +223,14 @@ namespace build2
// executables imported from /usr/bin, etc). We are registering it on
// the global scope similar to builtin rules.
//
+ // Note: use target instead of anything more specific (such as
+ // mtime_target) in order not to take precedence over the "dist" rule
+ // above.
+ //
// See a similar rule in the config module.
//
- rs.global_scope ().insert_rule<mtime_target> (
- dist_id, 0, "dist.file", file_rule::instance);
+ rs.global_scope ().insert_rule<target> (
+ dist_id, 0, "dist.file", file_rule_);
// Configuration.
//