|
Boost-Build : |
Subject: Re: [Boost-build] Building an executable, then running it
From: Reynolds, John (John.Reynolds_at_[hidden])
Date: 2010-01-29 11:48:54
This may or may not aid you
http://old.nabble.com/Beginner-problems---bjam-td21794467.html
________________________________
From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of k h
Sent: 22 January 2010 23:11
To: Boost.Build developer's and user's list
Subject: [Boost-build] Building an executable, then running it
I would like to compute a tag so it would contain the current version of the library being built. The version is in a C++ header, so I thought I could:
i) build an executable that prints the version
ii) run it
iii) use the output to determine the tag
The following bjam file will print the version correctly the *second* time it is run. The first time it says "sh: tmp/showversion: No such file or directory", then proceeds to build and install tmp/showversion. What am I doing wrong please? Many thanks.
exe showversion : showversion.cpp : <include>$(BOOST_INCLUDE) ;
install tmp : showversion ;
DEPENDS version : tmp/showversion
rule version ( )
{
return [ SHELL tmp/showversion ] ;
}
echo [ version ] ;
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