Using boost-build
/ bjam
, is it possible to execute a script after an install
rule has completed?
I have a Jamfile
which defined an executable (exe
), and then installs it (install
). I want to execute a script after the install
step.
Jamfile:
exe my_app
: [ glob *.cc ]
: <link>static
;
install .
: my_app
;
{ execute script after install here }
I am aware that I can execute a script
[ SHELL "path/to/script.sh" ] ;
But I don't know how to have install
be a dependency of the execution of that script?
You can probably use notfile
target as described here. Although it is not explicitly stated there, notfile
target also accepts a list of dependencies, so you can pass the install target as a source for notfile
.
import notfile ;
install install-app : my_app : <location>. ;
notfile . : @post-install : install-app ;
actions post-install
{
echo Install is now done.
}