Преглед изворни кода

[tools][mdk] fix .uvoptx/uvopt project name

e.g. scons --target=mdk5/4 --project-path='test'
will generate the test.uvoptx/uvopt file correctly
Meco Man пре 1 година
родитељ
комит
86f127311d
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      tools/keil.py

+ 2 - 2
tools/keil.py

@@ -330,7 +330,7 @@ def MDK4Project(target, script):
     # copy uvopt file
     if os.path.exists('template.uvopt'):
         import shutil
-        shutil.copy2('template.uvopt', 'project.uvopt')
+        shutil.copy2('template.uvopt', '{}.uvopt'.format(os.path.splitext(target)[0]))
 
 def MDK5Project(target, script):
 
@@ -349,7 +349,7 @@ def MDK5Project(target, script):
     # copy uvopt file
     if os.path.exists('template.uvoptx'):
         import shutil
-        shutil.copy2('template.uvoptx', 'project.uvoptx')
+        shutil.copy2('template.uvoptx', '{}.uvoptx'.format(os.path.splitext(target)[0]))
 
 def MDK2Project(target, script):
     template = open('template.Uv2', "r")