Kaydet (Commit) 53d37559 authored tarafından jan Iversen's avatar jan Iversen

gbuild-to-ide, add pr module sources

Additional to having sources pr target (needed
for generarition), each module also has a sources key
where all the module source files are sorted, this allows
to present the user with a sorted list of sources.

Change-Id: I8fd8249c88dc55f47199b7998faeb721d74f982f
üst 03bbd573
...@@ -49,9 +49,6 @@ class GbuildParser: ...@@ -49,9 +49,6 @@ class GbuildParser:
foundincludes.append(includeswitch.strip()[len(json_srcdir)+1:]) foundincludes.append(includeswitch.strip()[len(json_srcdir)+1:])
else: else:
foundincludes.append(includeswitch.strip()) foundincludes.append(includeswitch.strip())
#foundincludes = [includeswitch.strip()[len(json_srcdir)+1:] for includeswitch in GbuildParser._includepattern.findall(includes) if
# len(includeswitch) > 2]
return (foundincludes, foundisystem) return (foundincludes, foundisystem)
def __split_objs(module,objsline, ext): def __split_objs(module,objsline, ext):
...@@ -91,6 +88,7 @@ class GbuildParser: ...@@ -91,6 +88,7 @@ class GbuildParser:
# tools translations # tools translations
# udkapi unoid # udkapi unoid
# Add handling of BLACKLIST # Add handling of BLACKLIST
# Relation between json object and file extension # Relation between json object and file extension
jsonSrc = { jsonSrc = {
'CXXOBJECTS': '.cxx', 'OBJCOBJECTS': '.m', 'OBJCXXOBJECTS': '.mm', 'COBJECTS': '.c', 'CXXOBJECTS': '.cxx', 'OBJCOBJECTS': '.m', 'OBJCXXOBJECTS': '.mm', 'COBJECTS': '.c',
...@@ -135,8 +133,14 @@ class GbuildParser: ...@@ -135,8 +133,14 @@ class GbuildParser:
moduleDict['include']={ 'targets': [], 'headers':self.headers_of('include')} moduleDict['include']={ 'targets': [], 'headers':self.headers_of('include')}
for module in sorted(moduleDict): for i in sorted(moduleDict):
self.modules[module] = moduleDict[module] module = moduleDict[i]
src = []
for target in module['targets']:
for ext in jsonSrc:
src.extend(target[ext])
module['sources'] = sorted(src)
self.modules[i] = module
return self return self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment