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/util/option.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/util/option.py')
-rw-r--r-- | jam-files/boost-build/util/option.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/jam-files/boost-build/util/option.py b/jam-files/boost-build/util/option.py deleted file mode 100644 index 47d6abdf..00000000 --- a/jam-files/boost-build/util/option.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2005-2010 Vladimir Prus. -# -# Use, modification and distribution is subject to the Boost Software -# License Version 1.0. (See accompanying file LICENSE_1_0.txt or -# http://www.boost.org/LICENSE_1_0.txt) - -import sys -import re -import b2.util.regex - -options = {} - -# Set a value for a named option, to be used when not overridden on the command -# line. -def set(name, value=None): - - global options - - options[name] = value - -def get(name, default_value=None, implied_value=None): - - global options - - matches = b2.util.regex.transform(sys.argv, "--" + re.escape(name) + "=(.*)") - if matches: - return matches[-1] - else: - m = b2.util.regex.transform(sys.argv, "--(" + re.escape(name) + ")") - if m and implied_value: - return implied_value - elif options.has_key(name) and options[name] != None: - return options[name] - else: - return default_value |