[tools] Add better way to generate MDK project file.

This commit is contained in:
BernardXiong 2015-05-11 21:12:53 +08:00
parent e38f3aa39c
commit 2313424f81
1 changed files with 11 additions and 0 deletions

View File

@ -19,6 +19,17 @@ elif sys.argv[1] == 'clean':
command = ' -c'
elif sys.argv[1] == 'project':
command = ' --target=mdk -s'
projects = os.listdir(BSP_ROOT)
for item in projects:
project_dir = os.path.join(BSP_ROOT, item)
if os.path.isfile(os.path.join(project_dir, 'template.uvproj')):
print ('prepare MDK project file on ' + project_dir)
os.system('scons --directory=' + project_dir + command)
sys.exit(0)
else:
usage()
sys.exit(0)