Boost logo

Boost-Build :

Subject: Re: [Boost-build] Rule that would modify a file in place
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-06-17 02:03:55


AMDG

On 06/12/2015 03:11 AM, Samuel Debionne wrote:
>
> Is there a way to modify a file in place (unconditionally) with boost
> build ?
> Here is my use case :
>
> exe myapp : mycode.cpp ;
>
> modify myapp : @install_name_tool : <os>MACOSX ;
> actions install_name_tool
> {
> install_name_tool -change /opt/local/lib/libtbb.dylib
> @executable_name/libtbb.dylib $(<)
> }
>

I don't think there's really a non-hackish
way to do this from Boost.Build. You
could try using a notfile target that
uses a forwarding rule:

notfile myapp.modify : @install_name_tool_xxx ;
rule install_name_tool_xxx ( targets * : sources * : properties * )
{
    install_name_tool $(sources) ;
}

In Christ,
Steven Watanabe


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