提交 a9bf7a9a 编写于 作者: B bernard.xiong

fix assemble file issue.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@681 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 693c6db1
......@@ -3,15 +3,15 @@ import string
import SCons.Script
def _get_filetype(fn):
if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'):
if fn.rfind('.c') != -1 or fn.rfind('.C') != -1 or fn.rfind('.cpp') != -1:
return 1
# assimble file type
if fn.rfind('.s') or fn.rfind('.S'):
if fn.rfind('.s') != -1 or fn.rfind('.S') != -1:
return 2
# header type
if fn.rfind('.h'):
if fn.rfind('.h') != -1:
return 5
# other filetype
......@@ -137,7 +137,7 @@ def MDKProject(target, script):
path = os.path.dirname(fn.abspath)
path = _make_path_relative(project_path, path)
path = os.path.join(path, name)
lines.insert(line_index, 'File %d,%d<%s><%s>\r\n'
lines.insert(line_index, 'File %d,%d,<%s><%s>\r\n'
% (group_index, _get_filetype(name), path, name))
line_index += 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册