|
Boost-Build : |
Subject: Re: [Boost-build] ALWAYS not working inside if block
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-10-12 10:43:24
AMDG
On 10/11/2014 09:37 PM, Edward Mitchell wrote:
> I am trying to update a target based on some external condition and have
> encountered some interesting behavior. Running
>
> rule my-rule ( targets + : sources * : properties * )
> {
> ...
> ALWAYS $(targets) ;
> ...
> }
>
> leads to all targets being updated, as one would expect. However
>
> rule my-rule ( targets + : sources * : properties * )
> {
> ...
> # Update if my-condition is true or the target does not exist
> if my-condition {
> ECHO "got here" ;
> ALWAYS $(targets) ;
> } else {
> ECHO "not updating" ;
> NOUPDATE $(targets) ;
> ...
> }
>
> outputs "got here" or "not updating" as appropriate, but the targets are
> updated only if my-condition is false and the target is missing, i.e.
> the else block is behaving as expected, but the if block seems to be a
> no-op. Has anyone else encountered this? Or is there a better way to
> achieve what I am trying to do?
>
I don't see how this can possibly be the
reason for your problem. Do you have a
minimal test case?
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