summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2008-06-13 01:09:04 -0400
committerAli Saidi <saidi@eecs.umich.edu>2008-06-13 01:09:04 -0400
commit907b28cc626e8b156d98187b0f91f5e8df0e9d56 (patch)
tree6713cd35ce3c7e49a620c0dd25982c27aec5d5d5 /src/SConscript
parent2b4874449ce45504a1759c593a1f9b00983fca01 (diff)
downloadgem5-907b28cc626e8b156d98187b0f91f5e8df0e9d56.tar.xz
HG: Add compiled hg revision and date to the standard M5 output.
Diffstat (limited to 'src/SConscript')
-rw-r--r--src/SConscript14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/SConscript b/src/SConscript
index 69c5b946d..e360611a0 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -332,6 +332,10 @@ env.Command('base/traceflags.hh', flags, generate.traceFlagsHH)
env.Command('base/traceflags.cc', flags, generate.traceFlagsCC)
Source('base/traceflags.cc')
+# Generate program_info.cc
+env.Command('base/program_info.cc',
+ Value(str(SCons.Node.FS.default_fs.SConstruct_dir)), generate.programInfo)
+
# Build the zip file
py_compiled = []
py_zip_depends = []
@@ -364,11 +368,19 @@ envList = []
# date.cc.
def make_objs(sources, env):
objs = [env.Object(s) for s in sources]
+
# make date.cc depend on all other objects so it always gets
# recompiled whenever anything else does
date_obj = env.Object('base/date.cc')
+
+ # Make the generation of program_info.cc dependend on all
+ # the other cc files and the compiling of program_info.cc
+ # dependent on all the objects but program_info.o
+ pinfo_obj = env.Object('base/program_info.cc')
+ env.Depends('base/program_info.cc', sources)
env.Depends(date_obj, objs)
- objs.append(date_obj)
+ env.Depends(pinfo_obj, objs)
+ objs.extend([date_obj,pinfo_obj])
return objs
# Function to create a new build environment as clone of current