diff options
author | jan Iversen <jani@documentfoundation.org> | 2017-01-28 10:03:22 +0100 |
---|---|---|
committer | jan Iversen <jani@documentfoundation.org> | 2017-01-28 10:03:22 +0100 |
commit | 53d3755972bfd3bd2cd650edf91f1483038028c8 (patch) | |
tree | 84a3f79523191eff144ede4d0b18667f967dddfe /bin/gbuild-to-ide | |
parent | gbuild-to-ide, centralized adding extension. (diff) | |
download | core-53d3755972bfd3bd2cd650edf91f1483038028c8.tar.gz core-53d3755972bfd3bd2cd650edf91f1483038028c8.zip |
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
Diffstat (limited to 'bin/gbuild-to-ide')
-rwxr-xr-x | bin/gbuild-to-ide | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index 18f88d387e91..47c7caedd9ae 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -49,9 +49,6 @@ class GbuildParser: foundincludes.append(includeswitch.strip()[len(json_srcdir)+1:]) else: 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) def __split_objs(module,objsline, ext): @@ -91,6 +88,7 @@ class GbuildParser: # tools translations # udkapi unoid # Add handling of BLACKLIST + # Relation between json object and file extension jsonSrc = { 'CXXOBJECTS': '.cxx', 'OBJCOBJECTS': '.m', 'OBJCXXOBJECTS': '.mm', 'COBJECTS': '.c', @@ -135,8 +133,14 @@ class GbuildParser: moduleDict['include']={ 'targets': [], 'headers':self.headers_of('include')} - for module in sorted(moduleDict): - self.modules[module] = moduleDict[module] + for i in sorted(moduleDict): + 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 |