|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64325 - in trunk/tools/build/v2: . tools
From: ghost_at_[hidden]
Date: 2010-07-25 07:58:40
Author: vladimir_prus
Date: 2010-07-25 07:58:38 EDT (Sun, 25 Jul 2010)
New Revision: 64325
URL: http://svn.boost.org/trac/boost/changeset/64325
Log:
Fix computation of default install prefix.
Text files modified:
trunk/tools/build/v2/Jamroot.jam | 4 ++--
trunk/tools/build/v2/tools/package.jam | 20 +++++++++++---------
2 files changed, 13 insertions(+), 11 deletions(-)
Modified: trunk/tools/build/v2/Jamroot.jam
==============================================================================
--- trunk/tools/build/v2/Jamroot.jam (original)
+++ trunk/tools/build/v2/Jamroot.jam 2010-07-25 07:58:38 EDT (Sun, 25 Jul 2010)
@@ -12,7 +12,7 @@
}
-package.install boost-build-engine
+package.install boost-build-engine boost-build
: # properties
: # binaries
bjam$(ext)
@@ -28,7 +28,7 @@
}
}
-package.install-data boost-build-core
+package.install-data boost-build-core
: # Which subdir of $prefix/share
boost-build
: # What to install
Modified: trunk/tools/build/v2/tools/package.jam
==============================================================================
--- trunk/tools/build/v2/tools/package.jam (original)
+++ trunk/tools/build/v2/tools/package.jam 2010-07-25 07:58:38 EDT (Sun, 25 Jul 2010)
@@ -39,10 +39,11 @@
import targets ;
import modules ;
-feature.feature install-default-prefix : : free ;
+feature.feature install-default-prefix : : free incidental ;
-rule install ( name : requirements * : binaries * : libraries * : headers * )
+rule install ( name package-name ? : requirements * : binaries * : libraries * : headers * )
{
+ package-name ?= $(name) ;
if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
{
# If --prefix is explicitly specified on the command line,
@@ -70,7 +71,7 @@
# First, figure out all locations. Use the default if no prefix option
# given.
- local prefix = [ get-prefix $(requirements) ] ;
+ local prefix = [ get-prefix $(name) : $(requirements) ] ;
# Architecture dependent files.
local exec-locate = [ option.get exec-prefix : $(prefix) ] ;
@@ -120,21 +121,22 @@
}
}
-rule install-data ( target-name : directory-name : data * : requirements * )
+rule install-data ( target-name : package-name : data * : requirements * )
{
+ package-name ?= target-name ;
if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
{
# If --prefix is explicitly specified on the command line,
# then we need wipe away any settings of datarootdir
option.set datarootdir : ;
- }
+ }
- local prefix = [ get-prefix $(requirements) ] ;
+ local prefix = [ get-prefix $(package-name) : $(requirements) ] ;
local datadir = [ option.get datarootdir : $(prefix)/share ] ;
stage.install $(target-name)
: $(data)
- : $(requirements) <location>$(datadir)/$(directory-name)
+ : $(requirements) <location>$(datadir)/$(package-name)
;
local c = [ project.current ] ;
@@ -145,7 +147,7 @@
}
}
-local rule get-prefix ( requirements * )
+local rule get-prefix ( package-name : requirements * )
{
local prefix = [ option.get prefix : [ property.select
<install-default-prefix> : $(requirements) ] ] ;
@@ -155,7 +157,7 @@
# Or some likely defaults if neither is given.
if ! $(prefix)
{
- if [ modules.peek : NT ] { prefix = C:\\$(name) ; }
+ if [ modules.peek : NT ] { prefix = C:\\$(package-name) ; }
else if [ modules.peek : UNIX ] { prefix = /usr/local ; }
}
return $(prefix) ;
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