|
Boost-Build : |
Subject: [Boost-build] target which depends on successful build
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2015-07-02 15:26:26
I have the following Jamfile which installs my binary as binary.version
(ie: it adds additional information to the name of the binary)
constant EXE : my_app ;
exe $(EXE) : [ glob *.cpp ] ;
install install-target : $(EXE) : <location>. ;
notfile . : @tag-file : install-target : ;
actions tag-file
{
mv $(>) $(>).$(VERSION)
}
It works, but is a little klunky:
1. install-target and tag-file action are duplicated in every Jamfile which
needs them. I would like to put this in the Jamroot, but simply moving it
doesn't work (I think because it depends on the current path and target
name) - is there any way to create a rule/aciton like this which can live
in the Jamroot and be called from Jamfiles?
2. every time I build, it will always call the tag-file action, instead of
only when the exe target is rebuilt. How can I make my tag-file action only
run when the exe is updated?
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk