Deleted Added
sdiff udiff text old ( 10181:6270235e0585 ) new ( 10196:be0e1724eb39 )
full compact
1# -*- mode:python -*-
2
3# Copyright (c) 2013 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 95 unchanged lines hidden (view full) ---

104'python-config' first.
105
106For more details, see:
107 http://gem5.org/wiki/index.php/Using_a_non-default_Python_installation
108"""
109 raise
110
111# Global Python includes
112import os
113import re
114import subprocess
115import sys
116
117from os import mkdir, environ
118from os.path import abspath, basename, dirname, expanduser, normpath
119from os.path import exists, isdir, isfile

--- 1035 unchanged lines hidden (view full) ---

1155
1156###################################################
1157#
1158# This function is used to set up a directory with switching headers
1159#
1160###################################################
1161
1162main['ALL_ISA_LIST'] = all_isa_list
1163def make_switching_dir(dname, switch_headers, env):
1164 # Generate the header. target[0] is the full path of the output
1165 # header to generate. 'source' is a dummy variable, since we get the
1166 # list of ISAs from env['ALL_ISA_LIST'].
1167 def gen_switch_hdr(target, source, env):
1168 fname = str(target[0])
1169 f = open(fname, 'w')
1170 isa = env['TARGET_ISA'].lower()
1171 print >>f, '#include "%s/%s/%s"' % (dname, isa, basename(fname))
1172 f.close()
1173
1174 # Build SCons Action object. 'varlist' specifies env vars that this
1175 # action depends on; when env['ALL_ISA_LIST'] changes these actions
1176 # should get re-executed.
1177 switch_hdr_action = MakeAction(gen_switch_hdr,
1178 Transform("GENERATE"), varlist=['ALL_ISA_LIST'])
1179
1180 # Instantiate actions for each header
1181 for hdr in switch_headers:
1182 env.Command(hdr, [], switch_hdr_action)
1183Export('make_switching_dir')
1184
1185###################################################
1186#
1187# Define build environments for selected configurations.
1188#
1189###################################################
1190
1191for variant_path in variant_paths:
1192 if not GetOption('silent'):

--- 92 unchanged lines hidden (view full) ---

1285 sticky_vars.Save(current_vars_file, env)
1286
1287 if env['USE_SSE2']:
1288 env.Append(CCFLAGS=['-msse2'])
1289
1290 # The src/SConscript file sets up the build rules in 'env' according
1291 # to the configured variables. It returns a list of environments,
1292 # one for each variant build (debug, opt, etc.)
1293 envList = SConscript('src/SConscript', variant_dir = variant_path,
1294 exports = 'env')
1295
1296 # Set up the regression tests for each build.
1297 for e in envList:
1298 SConscript('tests/SConscript',
1299 variant_dir = joinpath(variant_path, 'tests', e.Label),
1300 exports = { 'env' : e }, duplicate = False)
1301
1302# base help text
1303Help('''
1304Usage: scons [scons options] [build variables] [target(s)]
1305
1306Extra scons options:
1307%(options)s
1308
1309Global build variables:
1310%(global_vars)s
1311
1312%(local_vars)s
1313''' % help_texts)