Boost logo

Boost-Build :

Subject: Re: [Boost-build] Basic bjam usage question, ALWAYS rule not working.
From: Mark E. Hamilton (mhamilt_at_[hidden])
Date: 2011-08-09 19:47:57


Okay, I managed to figure this out myself. What I came up with was this:

make sentinel.file : : @make-sentinel : <location>. ;
actions make-sentinel { mkdir -p $(<) }

This worked, so I expanded it to be more like what I wanted:

alias sentinel : sentinel.file ;
make sentinel.file : : @make-sentinel : <location>. ;
actions make-sentinel
   {
   date >> $(<)
   }
ALWAYS sentinel ;
ALWAYS sentinel.file ;

This creates the file, but only if it does not exist. Subsequent runs do
not seem to execute the actions again, so the file doesn't get updated:

% bjam toolset=gcc sentinel
...found 3 targets...
...updating 1 target...
Jamfile</scratch/mhamilt/test/test>.make-sentinel sentinel.file
...updated 1 target...

% cat sentinel.file
Tue Aug 9 17:43:29 MDT 2011

% sleep 10
% bjam toolset=gcc sentinel
...found 3 targets...

% cat sentinel.file
Tue Aug 9 17:43:29 MDT 2011

Note that the date written to the file did not change after the second
bjam invocation. I'm either using the ALWAYS rule incorrectly or it's
not working for me. Does anyone have any input for me on this?

-- 
----------------
Mark E. Hamilton
GAITS, Inc.
Sandia National Laboratory, NM.
505-844-7666

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