Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-11-03 15:16:21


Daniel Krügler wrote:
> I just came in from "gmane.comp.lib.boost.user, where helpful readers
> motivated me to ask my issue in this group:

Welcome :-)

> In advance, please forgive my hasty jump into this group, but I'm a
> *very* dummy bjam user and I need to fix the following issue as quickly
> as possible:
>
> Could please someone point me out, how I have to manipulate the boost
> bjam config file(s), such that it is possible to attach a user-defined
> string constant at every output file of the build? I would like to use
> the normal naming pattern described on
>
> http://boost.org/more/getting_started.html#Results
>
> but *extended* with a user-defined string, e.g. "your_build_id" or
> "20061102", e.g.:
>
> libboost_date_time-gcc-mt-d-1_31-your_build_id.a
>
> How do I have to modify which bjam files to reach that effect?

First I for BBv2 I already added a "--buildid=ID" option that does that,
after your post reminded me about the todo. And in case you don't know
BBv2 is the next version of Boost.Build we are using for the next
release. For BBv1...

> For a quick workaround, it would even be sufficient to use a hardcoded
> string constant inside the bjam configuration file(s)!

Of course :-)

> I would appreciate any helpful hint, example, whatever!

Try the attached patch to boost-base.jam. Which should let you use the
--buildid option with BBv1. It's a quick hack in that it doesn't take
care to clean up the specified ID to make it filename safe. So you'll
have to be careful what you specify for the ID.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Index: tools/build/v1/boost-base.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v1/boost-base.jam,v
retrieving revision 1.155
diff -u -r1.155 boost-base.jam
--- tools/build/v1/boost-base.jam 19 Oct 2005 22:33:31 -0000 1.155
+++ tools/build/v1/boost-base.jam 3 Nov 2006 20:07:56 -0000
@@ -2697,10 +2697,13 @@
         version-tag = $(version-tag:J="_") ;
     }
     
+ local build-id = [ MATCH "^--buildid=(.*)" : $(ARGV) ] ;
+
     tags += $(toolset-tag:J=) ;
     tags += $(thread-tag:J=) ;
     tags += $(runtime-tag:J=) ;
     tags += $(version-tag) ;
+ tags += $(build-id) ;
     
     if $(tags)
     {


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