[Tools] Fix the walk_children issue

This commit is contained in:
bernard
2017-12-13 20:13:45 +08:00
parent d6aa42285a
commit 3802754f05
4 changed files with 44 additions and 17 deletions

View File

@@ -31,17 +31,20 @@ import xml.etree.ElementTree as etree
from xml.etree.ElementTree import SubElement
from utils import _make_path_relative
from utils import xml_indent
import utils
fs_encoding = sys.getfilesystemencoding()
def CB_AddHeadFiles(program, elem, project_path):
building.source_ext = []
building.source_ext = ["h"]
utils.source_ext = []
utils.source_ext = ["h"]
for item in program:
building.walk_children(item)
building.source_list.sort()
# print building.source_list
utils.walk_children(item)
utils.source_list.sort()
# print utils.source_list
for f in building.source_list:
for f in utils.source_list:
path = _make_path_relative(project_path, f)
Unit = SubElement(elem, 'Unit')
Unit.set('filename', path.decode(fs_encoding))