mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-21 07:11:14 +08:00
[Tools] Fix the walk_children issue
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user