Generalize the configuration processing so that the top-level SConstruct only processes the ARCH symbol and prepares the PLATFORM and SUBARCH entries so as to write the config.h. Everything is now entered in the environment so the SConscript files can be responsible fo rthe processing.

This commit is contained in:
Russel Winder
2009-08-28 10:39:19 +01:00
parent f6707e3ca7
commit 03205855cc
2 changed files with 10 additions and 5 deletions

View File

@@ -30,12 +30,12 @@ sources = \
Glob('glue/' + environment['ARCH'] + '/*.[cS]') + \
Glob('platform/' + environment['PLATFORM'] + '/*.[cS]')
for item in environment['driverList'] :
for item in environment['DRIVER'] :
path = 'drivers/' + item
if not os.path.isdir(path):
feature , device = item.split ( '/' )
raise ValueError, 'Driver ' + device + ' for ' + feature + ' not available.'
sources += Glob('drivers/' + item + '/*.[cS]')
sources += Glob(path + '/*.[cS]')
objects = environment.Object(sources)
Depends(objects, environment['configFiles'])