Merge pull request #1510 from armink/fix_scons

[tools][scons] Fix error notice when 'EXEC_PATH' is not exist.
This commit is contained in:
Bernard Xiong 2018-06-07 20:46:35 +08:00 committed by GitHub
commit 3592b3684a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -130,9 +130,6 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
sys.path = sys.path + [os.path.join(Rtt_Root, 'tools')] 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 # add compability with Keil MDK 4.6 which changes the directory of armcc.exe
if rtconfig.PLATFORM == 'armcc': if rtconfig.PLATFORM == 'armcc':
if not os.path.isfile(os.path.join(rtconfig.EXEC_PATH, 'armcc.exe')): 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 from cscope import CscopeDatabase
CscopeDatabase(Projects) 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): def SrcRemove(src, remove):
if not src: if not src:
return return