|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83693 - trunk/tools/build/v2/tools
From: steven_at_[hidden]
Date: 2013-04-01 17:02:49
Author: steven_watanabe
Date: 2013-04-01 17:02:48 EDT (Mon, 01 Apr 2013)
New Revision: 83693
URL: http://svn.boost.org/trac/boost/changeset/83693
Log:
Some cleanup
Text files modified:
trunk/tools/build/v2/tools/zlib.jam | 65 ++++++++++++++-------------------------
1 files changed, 24 insertions(+), 41 deletions(-)
Modified: trunk/tools/build/v2/tools/zlib.jam
==============================================================================
--- trunk/tools/build/v2/tools/zlib.jam (original)
+++ trunk/tools/build/v2/tools/zlib.jam 2013-04-01 17:02:48 EDT (Mon, 01 Apr 2013)
@@ -1,4 +1,5 @@
# Copyright (c) 2010 Vladimir Prus.
+# Copyright (c) 2013 Steven Watanabe
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
@@ -106,11 +107,6 @@
project.initialize $(__name__) ;
.project = [ project.current ] ;
project zlib ;
-
- .default-alternative = [ new ac-library zlib : $(.project) ] ;
- $(.default-alternative).set-header $(header) ;
- $(.default-alternative).set-default-names $(names) ;
- targets.main-target-alternative $(.default-alternative) ;
}
local library-path = [ property.select <search> : $(options) ] ;
@@ -145,11 +141,18 @@
source-path ?= [ modules.peek : ZLIB_SOURCE ] ;
- if ! $(condition) && $(is-default) && $(.configured)
+ if $(.configured.$(condition:J=-))
{
- if $(.debug)
+ if $(is-default)
{
- ECHO "notice: [zlib] zlib is already configured" ;
+ if $(.debug)
+ {
+ ECHO "notice: [zlib] zlib is already configured" ;
+ }
+ }
+ else
+ {
+ errors.user-error "zlib is already configured" ;
}
return ;
}
@@ -194,25 +197,14 @@
: <include>$(source-path) ] ;
}
- if ! $(condition)
+ local mt = [ new ac-library zlib : $(.project) : $(condition) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ if $(target)
{
- .configured = true ;
- if $(target)
- {
- $(.default-alternative).set-target $(target) ;
- }
- }
- else
- {
- local mt = [ new ac-library zlib : $(.project) : $(condition) ] ;
- $(mt).set-header $(header) ;
- $(mt).set-default-names $(names) ;
- if $(target)
- {
- $(mt).set-target $(target) ;
- }
- targets.main-target-alternative $(mt) ;
+ $(mt).set-target $(target) ;
}
+ targets.main-target-alternative $(mt) ;
} else {
if $(.debug)
{
@@ -222,21 +214,12 @@
ECHO "notice: [zlib] Condition $(condition)" ;
}
}
- if ! $(condition)
- {
- .configured = true ;
- # Special case the no-condition case so that 'using' without parameters
- # can mix with more specific 'using'.
- $(.default-alternative).reconfigure
- $(include-path) : $(library-path) : $(library-name) : $(root) ;
- }
- else
- {
- local mt = [ new ac-library zlib : $(.project) : $(condition) :
- $(include-path) : $(library-path) : $(library-name) : $(root) ] ;
- $(mt).set-header $(header) ;
- $(mt).set-default-names $(names) ;
- targets.main-target-alternative $(mt) ;
- }
+
+ local mt = [ new ac-library zlib : $(.project) : $(condition) :
+ $(include-path) : $(library-path) : $(library-name) : $(root) ] ;
+ $(mt).set-header $(header) ;
+ $(mt).set-default-names $(names) ;
+ targets.main-target-alternative $(mt) ;
}
+ .configured.$(condition:J=-) = true ;
}
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