mirror of
https://github.com/drasko/codezero.git
synced 2026-07-12 18:34:11 +02:00
Add check to ensure the source for the required device driver is actually present.
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
#
|
#
|
||||||
# Author: Russel Winder
|
# Author: Russel Winder
|
||||||
|
|
||||||
|
import os.path
|
||||||
|
|
||||||
Import('environment')
|
Import('environment')
|
||||||
|
|
||||||
sources = \
|
sources = \
|
||||||
@@ -29,6 +31,10 @@ sources = \
|
|||||||
Glob('platform/' + environment['PLATFORM'] + '/*.[cS]')
|
Glob('platform/' + environment['PLATFORM'] + '/*.[cS]')
|
||||||
|
|
||||||
for item in environment['driverList'] :
|
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]')
|
sources += Glob('drivers/' + item + '/*.[cS]')
|
||||||
|
|
||||||
objects = environment.Object(sources)
|
objects = environment.Object(sources)
|
||||||
|
|||||||
Reference in New Issue
Block a user