From 268d17927a6007f5053dada5066bef311abd64fa Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 5 Sep 2009 12:16:10 +0000 Subject: [PATCH] Remove more formatting changes [SVN r56037] --- v2/build/alias.jam | 78 +++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/v2/build/alias.jam b/v2/build/alias.jam index 80e2c6375..14b938bdd 100644 --- a/v2/build/alias.jam +++ b/v2/build/alias.jam @@ -1,72 +1,72 @@ -# Copyright 2003, 2004, 2006 Vladimir Prus -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +# Copyright 2003, 2004, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -# This module defines the 'alias' rule and the associated target class. +# This module defines the 'alias' rule and associated class. # -# Alias is just a main target which returns its source targets without any -# processing. For example: +# Alias is just a main target which returns its source targets without any +# processing. For example:: # -# alias bin : hello test_hello ; -# alias lib : helpers xml_parser ; +# alias bin : hello test_hello ; +# alias lib : helpers xml_parser ; # -# Another important use of 'alias' is to conveniently group source files: +# Another important use of 'alias' is to conveniently group source files:: # -# alias platform-src : win.cpp : NT ; -# alias platform-src : linux.cpp : LINUX ; -# exe main : main.cpp platform-src ; +# alias platform-src : win.cpp : NT ; +# alias platform-src : linux.cpp : LINUX ; +# exe main : main.cpp platform-src ; +# +# Lastly, it's possible to create local alias for some target, with different +# properties:: # -# Lastly, it is possible to create a local alias for some target, with different -# properties: -# -# alias big_lib : : @/external_project/big_lib/static ; +# alias big_lib : : @/external_project/big_lib/static ; # +import targets ; import "class" : new ; +import errors : error ; import project ; import property-set ; -import targets ; - -class alias-target-class : basic-target +class alias-target-class : basic-target { - rule __init__ ( name : project : sources * : requirements * + rule __init__ ( name : project : sources * : requirements * : default-build * : usage-requirements * ) { - basic-target.__init__ $(name) : $(project) : $(sources) : $(requirements) - : $(default-build) : $(usage-requirements) ; + basic-target.__init__ $(name) : $(project) : $(sources) : $(requirements) + : $(default-build) : $(usage-requirements) ; } - + rule construct ( name : source-targets * : property-set ) { return [ property-set.empty ] $(source-targets) ; - } - - rule compute-usage-requirements ( subvariant ) + } + + rule compute-usage-requirements ( subvariant ) { local base = [ basic-target.compute-usage-requirements $(subvariant) ] ; # Add source's usage requirement. If we don't do this, "alias" does not - # look like a 100% alias. + # look like 100% alias. return [ $(base).add [ $(subvariant).sources-usage-requirements ] ] ; } + } - # Declares the 'alias' target. It will build sources, and return them unaltered. -# -rule alias ( name : sources * : requirements * : default-build * : - usage-requirements * ) +rule alias ( name : sources * : requirements * : default-build * : usage-requirements * ) { local project = [ project.current ] ; - + targets.main-target-alternative - [ new alias-target-class $(name) : $(project) - : [ targets.main-target-sources $(sources) : $(name) : no-renaming ] - : [ targets.main-target-requirements $(requirements) : $(project) ] - : [ targets.main-target-default-build $(default-build) : $(project) ] - : [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ] - ] ; + [ new alias-target-class $(name) : $(project) + : [ targets.main-target-sources $(sources) : $(name) : no-renaming ] + : [ targets.main-target-requirements $(requirements) : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + : [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ] + ] ; } - IMPORT $(__name__) : alias : : alias ; + + +