summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2011-06-02 17:36:18 -0700
committerNathan Binkert <nate@binkert.org>2011-06-02 17:36:18 -0700
commitf49f384fe415e68096d16e0ef5396136bc97b292 (patch)
tree001da956d5baae230dd2a384ce36ef2339edb2ef /src
parent0c424344facaa2b388cba814f08ef5622f8e122b (diff)
downloadgem5-f49f384fe415e68096d16e0ef5396136bc97b292.tar.xz
scons: rename some things from m5 to gem5
The default generated binary is now gem5.<type> instead of m5.<type>. The latter does still work but gem5.<type> will be generated first and then m5.<type> will be hard linked to it.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/SConscript18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/SConscript b/src/SConscript
index 432450b03..46f770499 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -41,7 +41,7 @@ from os.path import basename, dirname, exists, isdir, isfile, join as joinpath
import SCons
-# This file defines how to build a particular configuration of M5
+# This file defines how to build a particular configuration of gem5
# based on variable settings in the 'env' build environment.
Import('*')
@@ -61,8 +61,8 @@ from m5.util import code_formatter
# get specifies a set of filters, only files that match those filters
# will be accepted (unspecified filters on files are assumed to be
# false). Current filters are:
-# main -- specifies the m5 main() function
-# skip_lib -- do not put this file into the m5 library
+# main -- specifies the gem5 main() function
+# skip_lib -- do not put this file into the gem5 library
# <unittest> -- unit tests use filters based on the unit test name
#
# A parent can now be specified for a source file and default filter
@@ -298,7 +298,7 @@ for extra_dir in extras_dir_list:
env.Append(CPPPATH=Dir(extra_dir))
# Workaround for bug in SCons version > 0.97d20071212
-# Scons bug id: 2006 M5 Bug id: 308
+# Scons bug id: 2006 gem5 Bug id: 308
for root, dirs, files in os.walk(base_dir, topdown=True):
Dir(root[len(base_dir) + 1:])
@@ -866,8 +866,9 @@ date_source = Source('base/date.cc', skip_lib=True)
def makeEnv(label, objsfx, strip = False, **kwargs):
# SCons doesn't know to append a library suffix when there is a '.' in the
# name. Use '_' instead.
- libname = 'm5_' + label
- exename = 'm5.' + label
+ libname = 'gem5_' + label
+ exename = 'gem5.' + label
+ secondary_exename = 'm5.' + label
new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
new_env.Label = label
@@ -943,7 +944,10 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
cmd = 'strip $SOURCE -o $TARGET'
targets = new_env.Command(exename, progname,
MakeAction(cmd, Transform("STRIP")))
-
+
+ new_env.Command(secondary_exename, exename,
+ MakeAction('ln $SOURCE $TARGET', Transform("HARDLINK")))
+
new_env.M5Binary = targets[0]
envList.append(new_env)