From 67dd8c4a0d99c6150a2a3e051f652acec5af26f5 Mon Sep 17 00:00:00 2001 From: armink Date: Thu, 7 Jun 2018 17:35:31 +0800 Subject: [PATCH] [tools][scons] Fix error notice when 'EXEC_PATH' is not exist. --- tools/building.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/building.py b/tools/building.py index 8ddacaa29e..4f75811e11 100644 --- a/tools/building.py +++ b/tools/building.py @@ -130,9 +130,6 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ sys.path = sys.path + [os.path.join(Rtt_Root, 'tools')] - if not os.path.exists(rtconfig.EXEC_PATH): - print "Error: Toolchain path (%s) is not exist, please check 'EXEC_PATH' in path or rtconfig.py." % rtconfig.EXEC_PATH - sys.exit(1) # add compability with Keil MDK 4.6 which changes the directory of armcc.exe if rtconfig.PLATFORM == 'armcc': if not os.path.isfile(os.path.join(rtconfig.EXEC_PATH, 'armcc.exe')): @@ -791,6 +788,11 @@ def EndBuilding(target, program = None): from cscope import CscopeDatabase CscopeDatabase(Projects) + if not GetOption('help') and not GetOption('target'): + if not os.path.exists(rtconfig.EXEC_PATH): + print "Error: Toolchain path (%s) is not exist, please check 'EXEC_PATH' in path or rtconfig.py." % rtconfig.EXEC_PATH + sys.exit(1) + def SrcRemove(src, remove): if not src: return