From 19c01e82b113db636bbac34f77a0f5f4a7525088 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 25 Jul 2007 18:21:11 -0700 Subject: Add a new SCons option called EXTRAS that allows you to include stuff in the build process that is outside of the main M5 tree. --HG-- extra : convert_revision : 6edc4fbc58240f83b59c7b5707c0390cdb85d9ec --- src/SConscript | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/SConscript b/src/SConscript index 34c14dc51..1cd1a1627 100644 --- a/src/SConscript +++ b/src/SConscript @@ -151,7 +151,6 @@ env.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())]) # # Walk the tree and execute all SConscripts # -scripts = [] srcdir = env['SRCDIR'] for root, dirs, files in os.walk(srcdir, topdown=True): if root == srcdir: @@ -164,6 +163,15 @@ for root, dirs, files in os.walk(srcdir, topdown=True): base = root[len(srcdir) + 1:] SConscript(joinpath(base, 'SConscript')) +for extra in env['EXTRAS'].split(':'): + extra = os.path.expanduser(extra) + env.Append(CPPPATH=[Dir(extra)]) + for root, dirs, files in os.walk(extra, topdown=True): + if 'SConscript' in files: + subdir = root[len(os.path.dirname(extra))+1:] + build_dir = joinpath(env['BUILDDIR'], subdir) + SConscript(joinpath(root, 'SConscript'), build_dir=build_dir) + for opt in env.ExportOptions: env.ConfigFile(opt) -- cgit v1.2.3