|
Boost-Commit : |
From: jurko.gospodnetic_at_[hidden]
Date: 2008-05-03 22:11:21
Author: jurko
Date: 2008-05-03 22:11:21 EDT (Sat, 03 May 2008)
New Revision: 45104
URL: http://svn.boost.org/trac/boost/changeset/45104
Log:
Simplified the stage.copy-file() rule. Minor stylistic changes.
Text files modified:
trunk/tools/build/v2/tools/stage.jam | 42 ++++++++++++++++-----------------------
1 files changed, 17 insertions(+), 25 deletions(-)
Modified: trunk/tools/build/v2/tools/stage.jam
==============================================================================
--- trunk/tools/build/v2/tools/stage.jam (original)
+++ trunk/tools/build/v2/tools/stage.jam 2008-05-03 22:11:21 EDT (Sat, 03 May 2008)
@@ -24,8 +24,8 @@
feature.feature <install-source-root> : : free path ;
feature.feature <so-version> : : free incidental ;
-# If 'on', version symlinks for shared libraries won't be created. Affects Unix
-# builds only.
+# If 'on', version symlinks for shared libraries will not be created. Affects
+# Unix builds only.
feature.feature <install-no-version-symlinks> : on : optional incidental ;
@@ -152,7 +152,7 @@
$(property-set) ] ;
# See if something special should be done when staging this type. It
- # is indicated by the presense of special "INSTALLED_" type.
+ # is indicated by the presence of a special "INSTALLED_" type.
local t = [ $(i).type ] ;
if $(t) && [ type.registered INSTALLED_$(t) ]
{
@@ -169,8 +169,8 @@
}
else
{
- staged-targets = [ stage.copy-file $(self.project) $(ename)
- : $(i) : $(new-properties) ] ;
+ staged-targets = [ stage.copy-file $(self.project) $(ename) :
+ $(i) : $(new-properties) ] ;
}
if ! $(staged-targets)
@@ -286,8 +286,8 @@
#
rule copy-file ( project name ? : source : properties )
{
- local targets ;
name ?= [ $(source).name ] ;
+ local relative ;
local new-a = [ new non-scanning-action $(source) : common.copy :
$(properties) ] ;
@@ -304,24 +304,16 @@
path = [ path.root $(path) [ path.pwd ] ] ;
relative = [ path.relative-to $(source-root) $(path) ] ;
- # Note: using $(name:D=$(relative)) might be faster here, but then we
- # need to explicitly check that relative is not ".", otherwise we might
- # get paths like
- #
- # <prefix>/boost/.
- #
- # try to create it, and mkdir will obviously fail.
- name = [ path.root $(name:D=) $(relative) ] ;
- targets = [ new file-target $(name) exact : [ $(source).type ] :
- $(project) : $(new-a) ] ;
- }
- else
- {
- targets = [ new file-target $(name:D=) exact : [ $(source).type ] :
- $(project) : $(new-a) ] ;
}
- return $(targets) ;
+ # Note: Using $(name:D=$(relative)) might be faster here, but then we would
+ # need to explicitly check that relative is not ".", otherwise we might get
+ # paths like '<prefix>/boost/.', try to create it and mkdir would obviously
+ # fail.
+ name = [ path.join $(relative) $(name:D=) ] ;
+
+ return [ new file-target $(name) exact : [ $(source).type ] : $(project) :
+ $(new-a) ] ;
}
@@ -364,7 +356,7 @@
if [ $(property-set).get <os> ] in NT CYGWIN ||
[ $(property-set).get <target-os> ] in windows cygwin
{
- # Relinking is never needed on NT
+ # Relinking is never needed on NT.
return [ stage.copy-file $(project)
: $(source) : $(property-set) ] ;
}
@@ -443,7 +435,7 @@
# 'Z' are numbers, we need to create NNN.XXX and NNN.XXX.YYY
# symbolic links.
local m = [ MATCH (.*)\\.([0123456789]+)\\.([0123456789]+)\\.([0123456789]+)$
- : [ $(copied).name ] ] ;
+ : [ $(copied).name ] ] ;
if $(m)
{
# Symlink without version at all is used to make
@@ -492,7 +484,7 @@
if <tag> in $(requirements:G)
{
errors.user-error
- "The <tag> property is not allowed for the 'install' rule" ;
+ "The <tag> property is not allowed for the 'install' rule" ;
}
targets.main-target-alternative
Boost-Commit 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