SConstruct (3118:3f4d39e125ae) | SConstruct (3356:39c17056dd41) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 333 unchanged lines hidden (view full) --- 342 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts', 343 False), 344 BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql), 345 BoolOption('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv), 346 BoolOption('USE_CHECKER', 'Use checker for detailed CPU models', False), 347 ('CC', 'C compiler', os.environ.get('CC', env['CC'])), 348 ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])), 349 BoolOption('BATCH', 'Use batch pool for build and tests', False), | 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 333 unchanged lines hidden (view full) --- 342 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts', 343 False), 344 BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql), 345 BoolOption('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv), 346 BoolOption('USE_CHECKER', 'Use checker for detailed CPU models', False), 347 ('CC', 'C compiler', os.environ.get('CC', env['CC'])), 348 ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])), 349 BoolOption('BATCH', 'Use batch pool for build and tests', False), |
350 ('BATCH_CMD', 'Batch pool submission command name', 'qdo') | 350 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'), 351 ('PYTHONHOME', 352 'Override the default PYTHONHOME for this system (use with caution)', 353 '%s:%s' % (sys.prefix, sys.exec_prefix)) |
351 ) 352 353# Non-sticky options only apply to the current build. 354nonsticky_opts = Options(args=ARGUMENTS) 355nonsticky_opts.AddOptions( 356 BoolOption('update_ref', 'Update test reference outputs', False) 357 ) 358 359# These options get exported to #defines in config/*.hh (see src/SConscript). 360env.ExportOptions = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \ 361 'USE_MYSQL', 'NO_FAST_ALLOC', 'SS_COMPATIBLE_FP', \ | 354 ) 355 356# Non-sticky options only apply to the current build. 357nonsticky_opts = Options(args=ARGUMENTS) 358nonsticky_opts.AddOptions( 359 BoolOption('update_ref', 'Update test reference outputs', False) 360 ) 361 362# These options get exported to #defines in config/*.hh (see src/SConscript). 363env.ExportOptions = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \ 364 'USE_MYSQL', 'NO_FAST_ALLOC', 'SS_COMPATIBLE_FP', \ |
362 'USE_CHECKER'] | 365 'USE_CHECKER', 'PYTHONHOME'] |
363 364# Define a handy 'no-op' action 365def no_action(target, source, env): 366 return 0 367 368env.NoAction = Action(no_action, None) 369 370################################################### --- 23 unchanged lines hidden (view full) --- 394 395# The emitter munges the source & target node lists to reflect what 396# we're really doing. 397def config_emitter(target, source, env): 398 # extract option name from Builder arg 399 option = str(target[0]) 400 # True target is config header file 401 target = os.path.join('config', option.lower() + '.hh') | 366 367# Define a handy 'no-op' action 368def no_action(target, source, env): 369 return 0 370 371env.NoAction = Action(no_action, None) 372 373################################################### --- 23 unchanged lines hidden (view full) --- 397 398# The emitter munges the source & target node lists to reflect what 399# we're really doing. 400def config_emitter(target, source, env): 401 # extract option name from Builder arg 402 option = str(target[0]) 403 # True target is config header file 404 target = os.path.join('config', option.lower() + '.hh') |
402 # Force value to 0/1 even if it's a Python bool 403 val = int(eval(str(env[option]))) | 405 val = env[option] 406 if isinstance(val, bool): 407 # Force value to 0/1 408 val = int(val) 409 elif isinstance(val, str): 410 val = '"' + val + '"' 411 |
404 # Sources are option name & value (packaged in SCons Value nodes) 405 return ([target], [Value(option), Value(val)]) 406 407config_builder = Builder(emitter = config_emitter, action = config_action) 408 409env.Append(BUILDERS = { 'ConfigFile' : config_builder }) 410 411################################################### --- 150 unchanged lines hidden --- | 412 # Sources are option name & value (packaged in SCons Value nodes) 413 return ([target], [Value(option), Value(val)]) 414 415config_builder = Builder(emitter = config_emitter, action = config_action) 416 417env.Append(BUILDERS = { 'ConfigFile' : config_builder }) 418 419################################################### --- 150 unchanged lines hidden --- |