Boost logo

Boost-Build :

Subject: [Boost-build] Generate txt file from b2
From: Norbert Wenzel (norbert.wenzel.lists_at_[hidden])
Date: 2017-06-18 07:14:13


Hi,

I have a library that builds with Boost.Build. The build output format
is "tagged", so the generated binaries look something like this:
`binaryname_version_compiler.ext`

What I'd like to achieve now, is to write the version number (which is
readily available in the Jamfile) into a newly generated text file
`version.txt`. In fact, preferably I would like to have a template file
and just replace the version number part in that template.

I've read about custom commands but as far as I understand these are all
external programs of some form that are called by b2. So to build the
library on different platforms I would have to add different platform
specific tools or install the same scripting engine on all platforms.

So is there some way to make b2 generate text files without resorting to
external tools to make this trivially portable across platforms
(assuming the same version of Boost.Build on all those platforms)?

thanks,
Norbert


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