$include_dir="/home/hyper-archives/boost-build/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-build] ALWAYS not working inside if block
From: Edward Mitchell (erm410_at_[hidden])
Date: 2014-10-11 23:37:09
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?
Thanks,
Ted