|
Boost-Build : |
Subject: Re: [Boost-build] Test if file exists
From: John Reid (j.reid_at_[hidden])
Date: 2011-09-01 05:00:14
On 01/09/11 09:48, John Reid wrote:
> I need to define some targets conditional on a file existing. How can I
> test for this in my Jamfile? Where should I have looked in the
> documentation to find this out?
I found it:
import path ;
local HAS_SOURCE_CODE = [ path.exists $(SRC_DIR)/logs2.h ] ;
if $(HAS_SOURCE_CODE) {
echo "Found source code at $(SRC_DIR)" ;
} else {
echo "Did not find source code" ;
}
There is no documentation for this I guess.
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