Add check to ensure the source for the required device driver is actually present.

This commit is contained in:
Russel Winder
2009-08-28 09:55:55 +01:00
parent 591cac56cf
commit 079b031616

View File

@@ -17,6 +17,8 @@
#
# Author: Russel Winder
import os.path
Import('environment')
sources = \
@@ -29,6 +31,10 @@ sources = \
Glob('platform/' + environment['PLATFORM'] + '/*.[cS]')
for item in environment['driverList'] :
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]')
objects = environment.Object(sources)