4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 17:03:30 +08:00

[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

View File

@ -19,6 +19,17 @@ elif sys.argv[1] == 'clean':
command = ' -c' command = ' -c'
elif sys.argv[1] == 'project': elif sys.argv[1] == 'project':
command = ' --target=mdk -s' 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: else:
usage() usage()
sys.exit(0) sys.exit(0)