From 8ee95f3d1164b3320fee3595f7ec9d8c9687dcad Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 1 May 2017 21:58:41 -0700 Subject: scons: arch: Generalize the switching header code. Factor out the ISA ness of the switching header generating function. Also turn it into a SCons builder which builds a single header, and a wrapping method which uses the builder on a group of header files which all target the same subdirectory. Change-Id: I87705f97b6ebd9baebd4ebcfea19cc1218a64ad0 Reviewed-on: https://gem5-review.googlesource.com/2983 Reviewed-by: Curtis Dunham Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- src/arch/SConscript | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/arch/SConscript') diff --git a/src/arch/SConscript b/src/arch/SConscript index 54d97a4d9..891a5a29a 100644 --- a/src/arch/SConscript +++ b/src/arch/SConscript @@ -43,8 +43,8 @@ Import('*') # ################################################################# -# List of headers to generate -isa_switch_hdrs = Split(''' +env.SwitchingHeaders( + Split(''' decoder.hh interrupts.hh isa.hh @@ -63,10 +63,8 @@ isa_switch_hdrs = Split(''' types.hh utility.hh vtophys.hh - ''') - -# Set up this directory to support switching headers -make_switching_dir('arch', isa_switch_hdrs, env) + '''), + env.subst('${TARGET_ISA}')) if env['BUILD_GPU']: gpu_isa_switch_hdrs = Split(''' -- cgit v1.2.3