Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-16 03:13:18


Vladimir Prus wrote:
> Hi Reece,
>
>>Most commercial software uses some form of version control system to
>>track software. Open source projects and even "home grown" projects use
>>VCS of some form or other.
>>
>>My question is this: is there interest in VCS support for performing
>>options like checkout and diff from inside BBv2?
>>
>>Support would include the following VCS systems: CVS, subversion and
>>perforce.
>>
>>I don't have anything available yet, just probing interest.
>
> We talked about it once with Steven Knight (SCons developer), when he was
> adding Subversion support to SCons. I never understood why adding svn support
> to a build tool makes any sense, and still don't understand it now.

The basic idea would be to automate common tasks inside the build system
instead of writing scripts to do them.

> The biggest questions is: to use Boost.Build to checkout anything at all, you
> need Jamfile, and you surely need to keep everything in Subversion, so you
> need to checkout Jamfile first. And if you checkout Jamfile, why don't you
> checkout all of your project?

I agree that it is a chicken and egg problem :). However, you can use it
in some circumstances. You would mainly use it to update a project once
you have it checked out. Alternatively, you could install BBv2 from
sourceforge or wherever and use that to initially checkout Boost.

Example: I am keeping Boost in perforce as part of my "thirdparty" area.
This allows me to create a branch of BBv2 to another area that I can
develop new features, making it easier to keep up-to-date with BBv2
changes. I currently have a cvs2perforce script. It would be nice to do
something like:

d:/thirdparty> bjam update dir=boost

Example: The Boost regression testsuite is checking out the latest CVS
to run the tests on. You could have an update target in the main
Jamfile[.v2] that allows you to get the latest (or a specific version)
of Boost. e.g.:

d:/thirdparty/boost> bjam update-cvs # get latest version
d:/thirdparty/boost> bjam update-cvs label=1_30 # get Boost 1.30

This would probably end up overwriting your Jamfile/BBv2, though :(!
However, you can have BBv2 separate from Boost :).

There are also common operations like comparing files/directories and
checking files in that it is easy to get wrong, especially if you are
not familiar with the command-line of a specific VCS. Having it in the
build system allows you to do:

...> echo Bugfixes for foo > desc.txt
...> bjam checkin-cvs branch=RC_1_34 desc=desc.txt

or

...> bjam diff-cvs # diff files with latest version
...> bjam diff compare-with=...

I am not sure how these will work with BBv2, but this is the sort of
thing I am referring to.

- Reece

 


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