update iar.py: fixed bug when path is absolute.

This commit is contained in:
aozima 2013-06-22 23:22:30 +08:00
parent bde2e918da
commit 0633e9853c
1 changed files with 9 additions and 2 deletions

View File

@ -37,6 +37,9 @@ def IARAddGroup(parent, name, files, project_path):
file = SubElement(group, 'file')
file_name = SubElement(file, 'name')
if os.path.isabs(path):
file_name.text = path.decode(fs_encoding)
else:
file_name.text = ('$PROJ_DIR$\\' + path).decode(fs_encoding)
def IARWorkspace(target):
@ -91,7 +94,11 @@ def IARProject(target, script):
if name.text == 'CCIncludePath2' or name.text == 'newCCIncludePaths':
for path in paths:
state = SubElement(option, 'state')
if os.path.isabs(path):
state.text = path
else:
state.text = '$PROJ_DIR$\\' + path
if name.text == 'CCDefines':
for define in CPPDEFINES:
state = SubElement(option, 'state')