SConscript (5068:85724aae4456) | SConscript (5192:582e583f8e7e) |
---|---|
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 --- 121 unchanged lines hidden (view full) --- 130# Children should have access 131Export('Source') 132Export('PySource') 133Export('SimObject') 134Export('SwigSource') 135 136######################################################################## 137# | 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 --- 121 unchanged lines hidden (view full) --- 130# Children should have access 131Export('Source') 132Export('PySource') 133Export('SimObject') 134Export('SwigSource') 135 136######################################################################## 137# |
138# Trace Flags 139# 140all_flags = {} 141trace_flags = [] 142def TraceFlag(name, desc=''): 143 if name in all_flags: 144 raise AttributeError, "Flag %s already specified" % name 145 flag = (name, (), desc) 146 trace_flags.append(flag) 147 all_flags[name] = () 148 149def CompoundFlag(name, flags, desc=''): 150 if name in all_flags: 151 raise AttributeError, "Flag %s already specified" % name 152 153 compound = tuple(flags) 154 for flag in compound: 155 if flag not in all_flags: 156 raise AttributeError, "Trace flag %s not found" % flag 157 if all_flags[flag]: 158 raise AttributeError, \ 159 "Compound flag can't point to another compound flag" 160 161 flag = (name, compound, desc) 162 trace_flags.append(flag) 163 all_flags[name] = compound 164 165Export('TraceFlag') 166Export('CompoundFlag') 167 168######################################################################## 169# |
|
138# Set some compiler variables 139# 140 141# Include file paths are rooted in this directory. SCons will 142# automatically expand '.' to refer to both the source directory and 143# the corresponding build directory to pick up generated include 144# files. 145env.Append(CPPPATH=Dir('.')) --- 156 unchanged lines hidden (view full) --- 302 swig_modules.append(Value(module)) 303 Source(cc_file) 304 PySource(package, py_file) 305 306# Generate the main swig init file 307env.Command('swig/init.cc', swig_modules, generate.makeSwigInit) 308Source('swig/init.cc') 309 | 170# Set some compiler variables 171# 172 173# Include file paths are rooted in this directory. SCons will 174# automatically expand '.' to refer to both the source directory and 175# the corresponding build directory to pick up generated include 176# files. 177env.Append(CPPPATH=Dir('.')) --- 156 unchanged lines hidden (view full) --- 334 swig_modules.append(Value(module)) 335 Source(cc_file) 336 PySource(package, py_file) 337 338# Generate the main swig init file 339env.Command('swig/init.cc', swig_modules, generate.makeSwigInit) 340Source('swig/init.cc') 341 |
342# Generate traceflags.py 343flags = [ Value(f) for f in trace_flags ] 344env.Command('base/traceflags.py', flags, generate.traceFlagsPy) 345PySource('m5', 'base/traceflags.py') 346 347env.Command('base/traceflags.hh', flags, generate.traceFlagsHH) 348env.Command('base/traceflags.cc', flags, generate.traceFlagsCC) 349Source('base/traceflags.cc') 350 |
|
310# Build the zip file 311py_compiled = [] 312py_zip_depends = [] 313for source in py_sources: 314 env.Command(source.compiled, source.source, generate.compilePyFile) 315 py_compiled.append(source.compiled) 316 317 # make the zipfile depend on the archive name so that the archive --- 99 unchanged lines hidden --- | 351# Build the zip file 352py_compiled = [] 353py_zip_depends = [] 354for source in py_sources: 355 env.Command(source.compiled, source.source, generate.compilePyFile) 356 py_compiled.append(source.compiled) 357 358 # make the zipfile depend on the archive name so that the archive --- 99 unchanged lines hidden --- |