diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-05-10 14:49:39 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-05-11 15:35:54 -0400 |
commit | fc5c57db15bc961718b3bb3e573eef30322af1ef (patch) | |
tree | f5bbca0feec1961b255593d867932f7542ff751a /SConstruct | |
parent | 5da4be677cb2bba4cba51c5cc6bfaef6e0c592cc (diff) | |
download | mongo-fc5c57db15bc961718b3bb3e573eef30322af1ef.tar.gz |
SERVER-18402 Search site_scons for well known variable customization files
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 97e6bac9c7a..f4cca12263c 100644 --- a/SConstruct +++ b/SConstruct @@ -328,9 +328,19 @@ add_option('cache-dir', "Specify the directory to use for caching objects if --cache is in use", 1, False, default="$BUILD_ROOT/scons/cache") +def find_mongo_custom_variables(): + files = [] + for path in sys.path: + probe = os.path.join(path, 'mongo_custom_variables.py') + if os.path.isfile(probe): + if not has_option('mute'): + print "Using mongo variable customization file {0}".format(probe) + files.append(probe) + return files + add_option('variables-files', "Specify variables files to load", - 1, False, default="") + 1, False, default=find_mongo_custom_variables()) variable_parse_mode_choices=['auto', 'posix', 'other'] add_option('variable-parse-mode', @@ -345,6 +355,10 @@ add_option('modules', # Setup the command-line variables def variable_shlex_converter(val): + # If the argument is something other than a string, propogate + # it literally. + if not isinstance(val, basestring): + return val parse_mode = get_option('variable-parse-mode') if parse_mode == 'auto': parse_mode = 'other' if is_running_os('windows') else 'posix' |