From 10ea003c84f01b7b9685123291a19e9c562221f7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 19 May 2018 12:32:19 +0200 Subject: Implement manifest installation rule in version module --- build2/version/rule.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'build2/version/rule.hxx') diff --git a/build2/version/rule.hxx b/build2/version/rule.hxx index 9172ba3..bf8d05f 100644 --- a/build2/version/rule.hxx +++ b/build2/version/rule.hxx @@ -9,6 +9,7 @@ #include #include +#include namespace build2 { @@ -47,6 +48,20 @@ namespace build2 static target_state perform_update (action, const target&); }; + + // Pre-process manifest before installation to patch in the version. + // + class manifest_install_rule: public install::file_rule + { + public: + manifest_install_rule () {} + + virtual bool + match (action, target&, const string&) const override; + + virtual auto_rmfile + install_pre (const file&, const install_dir&) const override; + }; } } -- cgit v1.1