diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-19 11:16:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-19 12:14:25 +0200 |
commit | 4947e501153d457ce25a49d8cc3c82b4be307b1a (patch) | |
tree | eb455b210ca4072e641ba5e46f2ce6fef3f25f67 /build2/install/rule.hxx | |
parent | ffaf9794efe344a6af27aaf3d69500bbf857559f (diff) |
Add lower-level pre/post installation hooks to install::file_rule
Diffstat (limited to 'build2/install/rule.hxx')
-rw-r--r-- | build2/install/rule.hxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/build2/install/rule.hxx b/build2/install/rule.hxx index 2ad3d4b..c84249e 100644 --- a/build2/install/rule.hxx +++ b/build2/install/rule.hxx @@ -11,6 +11,7 @@ #include <build2/rule.hxx> #include <build2/target.hxx> #include <build2/operation.hxx> +#include <build2/filesystem.hxx> namespace build2 { @@ -108,7 +109,7 @@ namespace build2 static target_state perform_update (action, const target&); - // Extra un/installation hooks. Return true if anything was + // Extra un/installation hooks. Return true if anything was actually // un/installed. // using install_dir = install::install_dir; // For derived rules. @@ -119,6 +120,19 @@ namespace build2 virtual bool uninstall_extra (const file&, const install_dir&) const; + // Lower-level pre/post installation hooks that can be used to override + // the source file path being installed (for example, to implement + // post-processing, etc). + // + // Note that one cannot generally perform post-processing in-place + // because of permissions. + // + virtual auto_rmfile + install_pre (const file&, const install_dir&) const; + + virtual bool + install_post (const file&, const install_dir&, auto_rmfile&&) const; + // Installation/uninstallation "commands". // // If verbose is false, then only print the command at verbosity level 2 |