Boost logo

Boost-Build :

From: Andre Hentz (ahentz_at_[hidden])
Date: 2004-04-04 16:08:45


I've tried to used the stage rules to copy some required libraries into
the installation directory. My first attempt was:

stage crypto : $(tools-lib-dir)/libcrypto.so
: <location>$(dist-dir)/lib/core
<name>libcrypto.so.0.9.7
;

which doesn't work because the target file name gets translated into
libcrypto.so.0.9.7.so (note the extra .so in the file name). In this
case, I could carefully change the file names and get it to work.
However, I thought it would be nice to be able to disable the suffix
replacement mechanism.

Please find attached a patch to add a <replace-suffix> property to stage
targets. You may want to choose a better name for this property.

Best,

Andre Hentz

 --------------040006080301010701030307 Content-Type: text/plain;
name="stage.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="stage.diff"

Index: stage.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/stage.jam,v
retrieving revision 1.35
diff -u -r1.35 stage.jam
--- stage.jam 31 Mar 2004 06:53:56 -0000 1.35
+++ stage.jam 4 Apr 2004 20:13:04 -0000
@@ -60,6 +60,7 @@

feature.feature <traverse-dependencies> : off on : incidental ;
feature.feature <include-type> : : free incidental ;
+feature.feature <replace-suffix> : on off : free incidental ;

class stage-target-class : basic-target
{
@@ -106,8 +107,16 @@
n = $(name) ;
}

- targets = [ new file-target $(n:D=) : [ $(source).type ]
- : $(self.project) ] ;
+ if [ $(property-set).get <replace-suffix> ] = "off"
+ {
+ targets = [ new file-target $(n:D=) :
+ : $(self.project) ] ;
+ }
+ else
+ {
+ targets = [ new file-target $(n:D=) : [ $(source).type ]
+ : $(self.project) ] ;
+ }
local a = [ $(source).action ] ;
local new-a ;
if $(a)
@@ -120,7 +129,10 @@
{
new-a = [ new action $(targets) : $(source) : common.copy ] ;
}
- $(targets).suffix [ $(source).suffix ] ;
+ if [ $(property-set).get <replace-suffix> ] != "off"
+ {
+ $(targets).suffix [ $(source).suffix ] ;
+ }
$(targets).action $(new-a) ;

return $(targets) ;
 --------------040006080301010701030307 Content-Type: text/plain;
name="stage.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="stage.log"

added <replace-suffix>on/off to stage rules
* v2/stage.jam
(construct-regular-targets): if replace-suffix is off, target
doesn't inherit type and suffix from source.

 --------------040006080301010701030307--


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