2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Remove more formatting changes

[SVN r56037]
This commit is contained in:
Vladimir Prus
2009-09-05 12:16:10 +00:00
parent f5c3968c1a
commit 268d17927a

View File

@@ -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 : <os>NT ;
# alias platform-src : linux.cpp : <os>LINUX ;
# exe main : main.cpp platform-src ;
# alias platform-src : win.cpp : <os>NT ;
# alias platform-src : linux.cpp : <os>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/<link>static ;
# alias big_lib : : @/external_project/big_lib/<link>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 ;