Boost logo

Boost-Build :

From: Daniel Krügler (dsp_at_[hidden])
Date: 2006-11-07 03:45:40


Rene Rivera wrote:
> Daniel Krügler wrote:
> 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.
> ------------------------------------------------------------------------
>
> 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)
> {

I would like to note that we found the reason for the incomplete
hardlink creation (as noted in my previous posting): Its due to the
pattern matching performed in Jamfile: (Starting with line 233)

             if $(NT)
             {
                 local version-files = [ MATCH "(.*[.]lib)" :
$(lib-dest-files) ] ;
                 local noversion-files ;
                 for local version-file in $(version-files)
                 {
                     local noversion-file =
                         [ MATCH "(.*)-[0-9_]+([.]lib)" :
$(version-file) ] ;
                     noversion-file =
$(noversion-file[1])$(noversion-file[2]) ;
                     MakeLocate $(noversion-file) : [ FDirName [
split-path $(lib-locate) ] ] ;
                     HardLink $(noversion-file) : $(version-file) ;
                     noversion-files += $(noversion-file) ;
                 }
                 declare-fake-targets $(lib-target) : $(noversion-files) ;
             }
             else if $(UNIX)
             {
                 local so-version-files = [ MATCH "(.*[.]so[.0-9]+)" :
$(lib-dest-files) ] ;
                 so-version-files ?= [ MATCH "(.*[.]so)" :
$(lib-dest-files) ] ;
                 local version-files = $(so-version-files) [ MATCH
"(.*[.]a)" : $(lib-dest-files) ] ;
                 local noversion-files ;

which leads to nasty side effects in case of an existing build id (The
hard links are no longer created). I assume that the NT case must be
modified as follows:

             if $(NT)
             {
                 local version-files = [ MATCH "(.*[.]lib)" :
$(lib-dest-files) ] ;
                 local noversion-files ;
                 for local version-file in $(version-files)
                 {
                     local noversion-file =
-----> [ MATCH "(.*)-[0-9_]+.*([.]lib)" :
-----> $(version-file) ] ;
                     noversion-file =
$(noversion-file[1])$(noversion-file[2]) ;
                     MakeLocate $(noversion-file) : [ FDirName [
split-path $(lib-locate) ] ] ;
                     HardLink $(noversion-file) : $(version-file) ;
                     noversion-files += $(noversion-file) ;
                 }
                 declare-fake-targets $(lib-target) : $(noversion-files) ;
             }

A similar change must be performed for UNIXes.

Thanks for your help,

Daniel


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