SCons: centralize the Dir() workaround for newer versions of scons.
authorNathan Binkert <nate@binkert.org>
Tue, 13 Jan 2009 22:17:50 +0000 (14:17 -0800)
committerNathan Binkert <nate@binkert.org>
Tue, 13 Jan 2009 22:17:50 +0000 (14:17 -0800)
Scons bug id: 2006 M5 Bug id: 308

src/SConscript
src/arch/mips/SConscript
src/arch/sparc/SConscript
src/arch/x86/SConscript
src/cpu/SConscript
src/kern/SConscript
src/mem/SConscript

index 2da5830a99f04dbb199e6dbc75f1f19de55f7004..a14e868fe50e3dc5b50ff6ca1273b75b897262af 100644 (file)
@@ -220,6 +220,11 @@ for extra_dir in extras_dir_list:
 # Add a flag defining what THE_ISA should be for all compilation
 env.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())])
 
+# Workaround for bug in SCons version > 0.97d20071212
+# Scons bug id: 2006 M5 Bug id: 308 
+for root, dirs, files in os.walk(base_dir, topdown=True):
+    Dir(root[len(base_dir) + 1:])
+
 ########################################################################
 #
 # Walk the tree and execute all SConscripts in subdirectories
index 0368e68bcf32edbeae15759a6defd658adcf4efb..0b470def656de5a94f77bb91b8d5ed046830598d 100644 (file)
@@ -33,9 +33,6 @@
 Import('*')
 
 if env['TARGET_ISA'] == 'mips':
-# Workaround for bug in SCons version > 0.97d20071212
-# Scons bug id: 2006 M5 Bug id: 308 
-    Dir('isa/formats')
     Source('faults.cc')
     Source('regfile/int_regfile.cc')
     Source('regfile/float_regfile.cc')
index 126587835944149431c850e4b052f2defc9b541e..6a4c08a8efd03178f442a73dac3eb93d00a7f1a6 100644 (file)
 Import('*')
 
 if env['TARGET_ISA'] == 'sparc':
-# Workaround for bug in SCons version > 0.97d20071212
-# Scons bug id: 2006 M5 Bug id: 308 
-    Dir('isa/formats')
-    Dir('isa/formats/mem')
     Source('asi.cc')
     Source('faults.cc')
     Source('floatregfile.cc')
index c2081156d36780753f998443da414527c6e2e78c..37719e75d1c9bcaf2f88501944e6405f8b349385 100644 (file)
@@ -357,17 +357,3 @@ if env['TARGET_ISA'] == 'x86':
         # Only non-header files need to be compiled.
         if not f.path.endswith('.hh'):
             Source(f)
-
-    # Workaround for bug in SCons version > 0.97d20071212
-    # Scons bug id: 2006 M5 Bug id: 308
-    from os.path import dirname, join as joinpath
-
-    Dir('isa')
-    Dir('isa/microops')
-    Dir('isa/decoder')
-    Dir('isa/formats')
-    Dir('isa/insts')
-    isa_dirs = set(map(lambda x:dirname(x), python_files))
-    for d in isa_dirs:
-        Dir(joinpath('isa/insts', d))
-     
index 334504660b52743a05de60d5d0a3cd7f8efe996d..f210cec9b7a67f5b98d4455f4846d54b042a1a34 100644 (file)
@@ -149,10 +149,6 @@ if env['USE_CHECKER']:
             print i,
         print ", please set USE_CHECKER=False or use one of those CPU models"
         Exit(1)
-# Workaround for bug in SCons version > 0.97d20071212
-# Scons bug id: 2006 M5 Bug id: 308
-else:
-    Dir('checker')
 
 TraceFlag('Activity')
 TraceFlag('Commit')
index b905a8b415095048c822c908238675774939b156..546c4b05857267ef10cfbe218edaa9a45d619c1b 100644 (file)
@@ -41,22 +41,9 @@ if env['FULL_SYSTEM']:
     Source('linux/linux_syscalls.cc')
     Source('linux/printk.cc')
     
-    # Workaround for bug in SCons version > 0.97d20071212
-    # Scons bug id: 2006 M5 Bug id: 308
-    Dir('tru64')
-
     if env['TARGET_ISA'] == 'alpha':
         Source('tru64/dump_mbuf.cc')
         Source('tru64/printf.cc')
         Source('tru64/tru64_events.cc')
         Source('tru64/tru64_syscalls.cc')
         TraceFlag('BADADDR')
-
-# Workaround for bug in SCons version > 0.97d20071212
-# Scons bug id: 2006 M5 Bug id: 308
-else:
-    Dir('linux')
-    if env['TARGET_ISA'] == 'alpha':
-        Dir('tru64')
-    elif env['TARGET_ISA'] == 'sparc':
-        Dir('solaris')
index c181c88c6735573022b5872b3c9291623eb72371..0b0017f81b2b51d237c22e3f03102e227bb23174 100644 (file)
@@ -35,10 +35,6 @@ SimObject('Bus.py')
 SimObject('PhysicalMemory.py')
 SimObject('MemObject.py')
 
-# Workaround for bug in SCons version > 0.97d20071212
-# Scons bug id: 2006 M5 Bug id: 308
-Dir('config')
-
 Source('bridge.cc')
 Source('bus.cc')
 Source('dram.cc')