0

使用boost-build/ ,是否可以在规则完成bjam后执行脚本?install

我有一个Jamfile它定义了一个可执行文件(exe),然后安装它(install)。我想在这install一步之后执行一个脚本。

果酱文件:

exe my_app
  : [ glob *.cc ]
  : <link>static
  ;

install .
  : my_app 
  ;

{ execute script after install here }

我知道我可以执行脚本

[ SHELL "path/to/script.sh" ] ;

但我不知道如何install依赖该脚本的执行?

4

1 回答 1

1

您可能可以使用此处notfile描述的目标。尽管此处没有明确说明,但target 也接受依赖项列表,因此您可以将安装目标作为.notfilenotfile

import notfile ;

install install-app : my_app : <location>. ;
notfile . : @post-install : install-app ;
actions post-install
{
    echo Install is now done.
}
于 2014-08-26T23:04:09.877 回答