Boost logo

Boost :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-03-04 11:01:58


On 2002-03-03 at 05:29 PM, bdawes_at_[hidden] (Beman Dawes) wrote:

>At 05:16 PM 3/2/2002, David Abrahams wrote:
>
> >
> >----- Original Message -----
> >From: "Rene Rivera" <grafik666_at_[hidden]>
> >
> >> >How does this get updated?
> >>
> >> Manually? If there's another way that would be cool :-) How does the
> >one in
> >> "version.hpp" get updated?
> >
> >We could arrange a tiny executable which produces a version number from
> >the one in version.hpp and use it with backquotes in the command-line.
> >Alternatively (simpler), we could arrange for version.hpp to be
> >auto-generated based on a number in a .jam file. Not a high priority but
> >it would be good to avoid multiple copies of this number.
>
>Yeah, there are three places now to keep the version number in sync;
>boost-root/index.htm, boost-root/boost/version.hpp, and
>boost-root/Jamrules.

OK, I have a rule that when place in the Jamrules like so:

version-info boost/version.hpp : Boost 1.27 ;

Produces a $BOOST_ROOT/boost/version.hpp file with:

#ifndef BOOST_VERSION_DEF
#define BOOST_VERSION_DEF
#define BOOST_VERSION_STRING "Boost 1.27"
#define BOOST_VERSION_MAJOR 1
#define BOOST_VERSION_MINOR 27
#define BOOST_VERSION_SUBMINOR 0
#define BOOST_VERSION 102700
#endif

Iff one invokes "jam dist" at the top-level only.

Also if we want to keep track of finer grain versions one can also include a:

version-info ../../../boost/version.hpp : Boost.Regex 1.2 ;

Which produces a combined version file with this content:

#ifndef BOOST_VERSION_DEF
#define BOOST_VERSION_DEF
#define BOOST_VERSION_STRING "Boost 1.27"
#define BOOST_VERSION_MAJOR 1
#define BOOST_VERSION_MINOR 27
#define BOOST_VERSION_SUBMINOR 0
#define BOOST_VERSION 102700
#endif
#ifndef BOOST_REGEX_VERSION_DEF
#define BOOST_REGEX_VERSION_DEF
#define BOOST_REGEX_VERSION_STRING "Boost.Regex 1.2"
#define BOOST_REGEX_VERSION_MAJOR 1
#define BOOST_REGEX_VERSION_MINOR 2
#define BOOST_REGEX_VERSION_SUBMINOR 0
#define BOOST_REGEX_VERSION 100200
#endif

But again, iff "jam dist" is invoked at the top-level.

It also sets the equivalent set of variables(same names) in Jam for use with
soname like things.

I don't think we can do much about the version in "index.htm", after all
that's the description of the version changes.

>Also, what happens when you use those rules to build an older version of
>Boost?

As long as the version variable is not set the behaviour is the same as
before. I imagine you would have a different Jamrules for the older version?

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk