Deleted Added
sdiff udiff text old ( 3118:3f4d39e125ae ) new ( 3356:39c17056dd41 )
full compact
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'),
351 ('PYTHONHOME',
352 'Override the default PYTHONHOME for this system (use with caution)',
353 '%s:%s' % (sys.prefix, sys.exec_prefix))
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', \
365 'USE_CHECKER', 'PYTHONHOME']
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')
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
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 ---