diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-19 12:32:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-19 12:32:19 +0200 |
commit | 10ea003c84f01b7b9685123291a19e9c562221f7 (patch) | |
tree | b2f718e46a789d669c533cc0d598e8565bcbab9c /build2/version/rule.hxx | |
parent | 4947e501153d457ce25a49d8cc3c82b4be307b1a (diff) |
Implement manifest installation rule in version module
Diffstat (limited to 'build2/version/rule.hxx')
-rw-r--r-- | build2/version/rule.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
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 <build2/utility.hxx> #include <build2/rule.hxx> +#include <build2/install/rule.hxx> 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; + }; } } |