fix assemble file issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@681 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
693c6db157
commit
a9bf7a9a38
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue