Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/2981
Change subject: scons: Get rid of the PHONY_BASE construction variable.
......................................................................
scons: Get rid of the PHONY_BASE construction variable.
The value of that variable can be computed more directly and more locally
to where it's consumed.
Change-Id: I5ca1f732a34e22d4dae2aeb6ee7fc8adebe1caa0
---
M SConstruct
M src/SConscript
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/SConstruct b/SConstruct
index 84a0a98..943862d 100755
--- a/SConstruct
+++ b/SConstruct
@@ -1416,7 +1416,6 @@
env.Command(hdr, [], switch_hdr_action)
isa_target = Dir('.').up().name.lower().replace('_', '-')
- env['PHONY_BASE'] = '#'+isa_target
all_isa_deps[isa_target] = None
Export('make_switching_dir')
@@ -1480,6 +1479,11 @@
#
###################################################
+def variant_name(path):
+ return os.path.basename(path).lower().replace('_', '-')
+main['variant_name'] = variant_name
+main['VARIANT_NAME'] = '${variant_name(BUILDDIR)}'
+
for variant_path in variant_paths:
if not GetOption('silent'):
print "Building in", variant_path
diff --git a/src/SConscript b/src/SConscript
index b2c7745..c2fab74 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -1374,9 +1374,9 @@
Builder(action=MakeAction(makeEnvirons,
Transform("ENVIRONS",
1)))})
-isa_target = env['PHONY_BASE'] + '-deps'
-environs = env['PHONY_BASE'] + '-environs'
-env.Depends('#all-deps', isa_target)
+isa_target = '#${VARIANT_NAME}-deps'
+environs = '#${VARIANT_NAME}-environs'
+env.Depends('#all-deps', isa_target)
env.Depends('#all-environs', environs)
env.ScanISA(isa_target, File('arch/%s/generated/inc.d' %
env['TARGET_ISA']))
envSetup = env.MakeEnvirons(environs, isa_target)
--
To view, visit https://gem5-review.googlesource.com/2981
To unsubscribe, visit https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ca1f732a34e22d4dae2aeb6ee7fc8adebe1caa0
Gerrit-Change-Number: 2981
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev