From 079b0316161503ca74919d4f35ca6f9f2af0b309 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Fri, 28 Aug 2009 09:55:55 +0100 Subject: [PATCH] Add check to ensure the source for the required device driver is actually present. --- src/SConscript | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SConscript b/src/SConscript index d016ba7..4fd93dd 100644 --- a/src/SConscript +++ b/src/SConscript @@ -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)