aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dist/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-01 10:00:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-01 10:00:37 +0200
commitf8de93520fd604a3771a2af3ca9564f6085d8baa (patch)
treeed55bf099269efa3453943336c77ce236c2577a6 /libbuild2/dist/operation.cxx
parenta6f5ad72f4c751cd62566de227a7cbe89ff3af26 (diff)
Make dist::rule reusable as base
Diffstat (limited to 'libbuild2/dist/operation.cxx')
-rw-r--r--libbuild2/dist/operation.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/libbuild2/dist/operation.cxx b/libbuild2/dist/operation.cxx
index e5c9307..af7b40b 100644
--- a/libbuild2/dist/operation.cxx
+++ b/libbuild2/dist/operation.cxx
@@ -16,6 +16,7 @@
#include <libbuild2/diagnostics.hxx>
#include <libbuild2/dist/types.hxx>
+#include <libbuild2/dist/rule.hxx>
#include <libbuild2/dist/module.hxx>
using namespace std;
@@ -237,10 +238,7 @@ namespace build2
fail << "unknown distribution package name" <<
info << "did you forget to set dist.package?";
- // Need non-const in order to clear postponed. This is safe since only
- // doing it when running serially.
- //
- module& mod (const_cast<module&> (*rs.find_module<module> (module::name)));
+ const module& mod (*rs.find_module<module> (module::name));
const string& dist_package (cast<string> (l));
const process_path& dist_cmd (cast<process_path> (rs.vars["dist.cmd"]));
@@ -301,9 +299,7 @@ namespace build2
for (auto i (mod.postponed.list.begin ());
i != mod.postponed.list.end ();
++i)
- {
- rule::match_postponed (i->action, i->target, i->prereq);
- }
+ rule::match_postponed (*i);
}
};