SConstruct (5227:46118115ac3d) | SConstruct (5273:69faa6c5e314) |
---|---|
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 --- 54 unchanged lines hidden (view full) --- 63# 64################################################### 65 66import sys 67import os 68 69from os.path import isdir, join as joinpath 70 | 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 --- 54 unchanged lines hidden (view full) --- 63# 64################################################### 65 66import sys 67import os 68 69from os.path import isdir, join as joinpath 70 |
71import SCons 72 |
|
71# Check for recent-enough Python and SCons versions. If your system's 72# default installation of Python is not recent enough, you can use a 73# non-default installation of the Python interpreter by either (1) 74# rearranging your PATH so that scons finds the non-default 'python' 75# first or (2) explicitly invoking an alternative interpreter on the 76# scons script, e.g., "/usr/local/bin/python2.4 `which scons` [args]". 77EnsurePythonVersion(2,4) 78 --- 388 unchanged lines hidden (view full) --- 467for root, dirs, files in os.walk('.'): 468 if 'SConsopts' in files: 469 SConscript(os.path.join(root, 'SConsopts')) 470 471all_isa_list.sort() 472all_cpu_list.sort() 473default_cpus.sort() 474 | 73# Check for recent-enough Python and SCons versions. If your system's 74# default installation of Python is not recent enough, you can use a 75# non-default installation of the Python interpreter by either (1) 76# rearranging your PATH so that scons finds the non-default 'python' 77# first or (2) explicitly invoking an alternative interpreter on the 78# scons script, e.g., "/usr/local/bin/python2.4 `which scons` [args]". 79EnsurePythonVersion(2,4) 80 --- 388 unchanged lines hidden (view full) --- 469for root, dirs, files in os.walk('.'): 470 if 'SConsopts' in files: 471 SConscript(os.path.join(root, 'SConsopts')) 472 473all_isa_list.sort() 474all_cpu_list.sort() 475default_cpus.sort() 476 |
475def ExtraPathValidator(key, val, env): | 477def PathListMakeAbsolute(val): |
476 if not val: | 478 if not val: |
479 return val 480 f = lambda p: os.path.abspath(os.path.expanduser(p)) 481 return ':'.join(map(f, val.split(':'))) 482 483def PathListAllExist(key, val, env): 484 if not val: |
|
477 return 478 paths = val.split(':') 479 for path in paths: | 485 return 486 paths = val.split(':') 487 for path in paths: |
480 path = os.path.expanduser(path) | |
481 if not isdir(path): | 488 if not isdir(path): |
482 raise AttributeError, "Invalid path: '%s'" % path | 489 raise SCons.Errors.UserError("Path does not exist: '%s'" % path) |
483 484sticky_opts.AddOptions( 485 EnumOption('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list), 486 BoolOption('FULL_SYSTEM', 'Full-system support', False), 487 # There's a bug in scons 0.96.1 that causes ListOptions with list 488 # values (more than one value) not to be able to be restored from 489 # a saved option file. If this causes trouble then upgrade to 490 # scons 0.96.90 or later. --- 13 unchanged lines hidden (view full) --- 504 ('CC', 'C compiler', os.environ.get('CC', env['CC'])), 505 ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])), 506 BoolOption('BATCH', 'Use batch pool for build and tests', False), 507 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'), 508 ('PYTHONHOME', 509 'Override the default PYTHONHOME for this system (use with caution)', 510 '%s:%s' % (sys.prefix, sys.exec_prefix)), 511 ('EXTRAS', 'Add Extra directories to the compilation', '', | 490 491sticky_opts.AddOptions( 492 EnumOption('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list), 493 BoolOption('FULL_SYSTEM', 'Full-system support', False), 494 # There's a bug in scons 0.96.1 that causes ListOptions with list 495 # values (more than one value) not to be able to be restored from 496 # a saved option file. If this causes trouble then upgrade to 497 # scons 0.96.90 or later. --- 13 unchanged lines hidden (view full) --- 511 ('CC', 'C compiler', os.environ.get('CC', env['CC'])), 512 ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])), 513 BoolOption('BATCH', 'Use batch pool for build and tests', False), 514 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'), 515 ('PYTHONHOME', 516 'Override the default PYTHONHOME for this system (use with caution)', 517 '%s:%s' % (sys.prefix, sys.exec_prefix)), 518 ('EXTRAS', 'Add Extra directories to the compilation', '', |
512 ExtraPathValidator) | 519 PathListAllExist, PathListMakeAbsolute) |
513 ) 514 515nonsticky_opts.AddOptions( 516 BoolOption('update_ref', 'Update test reference outputs', False) 517 ) 518 519# These options get exported to #defines in config/*.hh (see src/SConscript). 520env.ExportOptions = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \ --- 249 unchanged lines hidden --- | 520 ) 521 522nonsticky_opts.AddOptions( 523 BoolOption('update_ref', 'Update test reference outputs', False) 524 ) 525 526# These options get exported to #defines in config/*.hh (see src/SConscript). 527env.ExportOptions = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \ --- 249 unchanged lines hidden --- |