From 907b28cc626e8b156d98187b0f91f5e8df0e9d56 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 13 Jun 2008 01:09:04 -0400 Subject: HG: Add compiled hg revision and date to the standard M5 output. --- src/SConscript | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/SConscript') 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 -- cgit v1.2.3