diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-05-18 14:03:24 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-05-19 09:47:20 +0200 |
commit | 74790206e182031bcf01c628622e2b646f699530 (patch) | |
tree | cc18e125dfb187710fa22d39214d5d46e4c2cd18 /bin/update_pch | |
parent | 8265e36cdcaa475282344c2e01bee5e323d0f0a0 (diff) |
make update_pch also work with libs in external/
Change-Id: I65b3461fd227e7e997b82a84631bbd5d00b28eb6
Reviewed-on: https://gerrit.libreoffice.org/72520
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'bin/update_pch')
-rwxr-xr-x | bin/update_pch | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/update_pch b/bin/update_pch index 0ccf38f347f5..372867393c93 100755 --- a/bin/update_pch +++ b/bin/update_pch @@ -520,7 +520,9 @@ def sort_by_category(list, root, module, filter_local): def parse_makefile(groups, lines, lineno, lastif, ifstack): inobjects = False + ingeneratedobjects = False inelse = False + suffix = 'cxx' os_cond_re = re.compile('(ifeq|ifneq)\s*\(\$\(OS\)\,(\w*)\)') line = lines[lineno] @@ -542,12 +544,21 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack): if line == '))': inobjects = False + ingeneratedobjects = False elif 'add_exception_objects' in line or \ 'add_cxxobject' in line: inobjects = True #print('inobjects') #if ifstack and not SILENT: #sys.stderr.write('Sources in a conditional, ignoring for now.\n') + elif 'add_generated_exception_objects' in line or \ + 'add_generated_cxxobject' in line: + ingeneratedobjects = True + elif 'set_generated_cxx_suffix' in line: + suffix_re = re.compile('.*set_generated_cxx_suffix,[^,]*,([^)]*).*') + match = suffix_re.match(line) + if match: + suffix = match.group(1) elif line.startswith('if'): lineno = parse_makefile(groups, lines, lineno, line, ifstack+1) continue @@ -557,10 +568,10 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack): continue elif line.startswith('else'): inelse = True - elif inobjects: + elif inobjects or ingeneratedobjects: if EXCLUDE_SYSTEM and ifstack: continue - file = line + '.cxx' + file = line + '.' + suffix if ',' in line or '(' in line or ')' in line: #print('passing: ' + line) pass # $if() probably, or something similar @@ -582,6 +593,8 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack): if osname not in groups: groups[osname] = [] + if ingeneratedobjects: + file = 'workdir/' + file groups[osname].append(file) return groups |