SConstruct (5708:96614cd66f76) | SConstruct (5742:828a8296270e) |
---|---|
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 --- 310 unchanged lines hidden (view full) --- 319# Update env with values from ARGUMENTS & file global_sticky_opts_file 320global_sticky_opts.Update(env) 321 322# Save sticky option settings back to current options file 323global_sticky_opts.Save(global_sticky_opts_file, env) 324 325# Parse EXTRAS option to build list of all directories where we're 326# look for sources etc. This list is exported as base_dir_list. | 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 --- 310 unchanged lines hidden (view full) --- 319# Update env with values from ARGUMENTS & file global_sticky_opts_file 320global_sticky_opts.Update(env) 321 322# Save sticky option settings back to current options file 323global_sticky_opts.Save(global_sticky_opts_file, env) 324 325# Parse EXTRAS option to build list of all directories where we're 326# look for sources etc. This list is exported as base_dir_list. |
327base_dir_list = [joinpath(ROOT, 'src')] | 327base_dir = joinpath(ROOT, 'src') |
328if env['EXTRAS']: | 328if env['EXTRAS']: |
329 base_dir_list += env['EXTRAS'].split(':') | 329 extras_dir_list = env['EXTRAS'].split(':') 330else: 331 extras_dir_list = [] |
330 | 332 |
331Export('base_dir_list') | 333Export('base_dir') 334Export('extras_dir_list') |
332 333# M5_PLY is used by isa_parser.py to find the PLY package. 334env.Append(ENV = { 'M5_PLY' : str(Dir('ext/ply')) }) 335env['GCC'] = subprocess.Popen(env['CXX'] + ' --version', shell=True, 336 stdout=subprocess.PIPE, stderr=subprocess.STDOUT, 337 close_fds=True).communicate()[0].find('g++') >= 0 338env['SUNCC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True, 339 stdout=subprocess.PIPE, stderr=subprocess.STDOUT, --- 249 unchanged lines hidden (view full) --- 589Export('sticky_opts') 590 591# Non-sticky options only apply to the current build. 592nonsticky_opts = Options(args=ARGUMENTS) 593Export('nonsticky_opts') 594 595# Walk the tree and execute all SConsopts scripts that wil add to the 596# above options | 335 336# M5_PLY is used by isa_parser.py to find the PLY package. 337env.Append(ENV = { 'M5_PLY' : str(Dir('ext/ply')) }) 338env['GCC'] = subprocess.Popen(env['CXX'] + ' --version', shell=True, 339 stdout=subprocess.PIPE, stderr=subprocess.STDOUT, 340 close_fds=True).communicate()[0].find('g++') >= 0 341env['SUNCC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True, 342 stdout=subprocess.PIPE, stderr=subprocess.STDOUT, --- 249 unchanged lines hidden (view full) --- 592Export('sticky_opts') 593 594# Non-sticky options only apply to the current build. 595nonsticky_opts = Options(args=ARGUMENTS) 596Export('nonsticky_opts') 597 598# Walk the tree and execute all SConsopts scripts that wil add to the 599# above options |
597for base_dir in base_dir_list: 598 for root, dirs, files in os.walk(base_dir): | 600for bdir in [ base_dir ] + extras_dir_list: 601 for root, dirs, files in os.walk(bdir): |
599 if 'SConsopts' in files: 600 print "Reading", joinpath(root, 'SConsopts') 601 SConscript(joinpath(root, 'SConsopts')) 602 603all_isa_list.sort() 604all_cpu_list.sort() 605default_cpus.sort() 606 --- 271 unchanged lines hidden --- | 602 if 'SConsopts' in files: 603 print "Reading", joinpath(root, 'SConsopts') 604 SConscript(joinpath(root, 'SConsopts')) 605 606all_isa_list.sort() 607all_cpu_list.sort() 608default_cpus.sort() 609 --- 271 unchanged lines hidden --- |