From 720e79e89cc7b48e32d7b2289c1c48ce2509d9a8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 3 Nov 2006 02:16:01 +0000 Subject: [PATCH] (merge from head) Add "--buildid" option for customizing the built libraries. [SVN r35813] --- Jamfile.v2 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Jamfile.v2 b/Jamfile.v2 index 4b19b1a296..0eb041579b 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -65,6 +65,9 @@ # is intended for system integrators to build # for packaging of distributions. # +# --buildid=ID Adds the specified ID to the name of built +# libraries. Default is to not add anything. +# # --help This message. # # --with- Build and install the specified @@ -108,6 +111,7 @@ import package ; import path ; import common ; import os ; +import regex ; constant BOOST_VERSION : 1.34.0 ; @@ -248,6 +252,12 @@ PYTHON_ROOT ?= $(python-root) ; # Select the libraries to install. libraries = [ libraries-to-install $(all-libraries) ] ; +# Custom build ID. +local build-id = [ MATCH "^--buildid=(.*)" : [ modules.peek : ARGV ] ] ; +if $(build-id) +{ + constant BUILD_ID : [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ; +} # This rule is called by Boost.Build to determine the name of # target. We use it to encode build variant, compiler name and @@ -260,6 +270,7 @@ rule tag ( name : type ? : property-set ) { local result = [ common.format-name -$(BOOST_VERSION_TAG) + -$(BUILD_ID) : $(name) : $(type) : $(property-set) ] ; # Optionally add version suffix. @@ -280,7 +291,7 @@ rule tag ( name : type ? : property-set ) else { return [ common.format-name - + -$(BUILD_ID) : $(name) : $(type) : $(property-set) ] ; } }