diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-10-22 12:07:20 +0100 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-10-22 12:07:20 +0100 |
commit | 5f98fe5c4f2a2090eeb9d30c030305a70a8347d1 (patch) | |
tree | 9b6002f850e6dea1e3400c6b19bb31a9cdf3067f /jam-files/boost-build/build/alias.py | |
parent | cf9994131993b40be62e90e213b1e11e6b550143 (diff) | |
parent | 21825a09d97c2e0afd20512f306fb25fed55e529 (diff) |
Merge remote branch 'upstream/master'
Conflicts:
Jamroot
bjam
decoder/Jamfile
decoder/cdec.cc
dpmert/Jamfile
jam-files/sanity.jam
klm/lm/Jamfile
klm/util/Jamfile
mira/Jamfile
Diffstat (limited to 'jam-files/boost-build/build/alias.py')
-rw-r--r-- | jam-files/boost-build/build/alias.py | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/jam-files/boost-build/build/alias.py b/jam-files/boost-build/build/alias.py deleted file mode 100644 index 575e5360..00000000 --- a/jam-files/boost-build/build/alias.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) - -# Status: ported (danielw) -# Base revision: 56043 - -# 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 bin : hello test_hello ; -# alias lib : helpers xml_parser ; -# -# 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 ; -# -# Lastly, it's possible to create local alias for some target, with different -# properties:: -# -# alias big_lib : : @/external_project/big_lib/<link>static ; -# - -import targets -import property_set -from b2.manager import get_manager - -from b2.util import metatarget - -class AliasTarget(targets.BasicTarget): - - def __init__(self, *args): - targets.BasicTarget.__init__(self, *args) - - def construct(self, name, source_targets, properties): - return [property_set.empty(), source_targets] - - def compute_usage_requirements(self, subvariant): - base = targets.BasicTarget.compute_usage_requirements(self, subvariant) - # Add source's usage requirement. If we don't do this, "alias" does not - # look like 100% alias. - return base.add(subvariant.sources_usage_requirements()) - -@metatarget -def alias(name, sources=[], requirements=[], default_build=[], usage_requirements=[]): - - project = get_manager().projects().current() - targets = get_manager().targets() - - targets.main_target_alternative(AliasTarget( - name, project, - targets.main_target_sources(sources, name, no_renaming=True), - targets.main_target_requirements(requirements or [], project), - targets.main_target_default_build(default_build, project), - targets.main_target_usage_requirements(usage_requirements or [], project))) - -# Declares the 'alias' target. It will build sources, and return them unaltered. -get_manager().projects().add_rule("alias", alias) - |