Kaydet (Commit) 74790206 authored tarafından Luboš Luňák's avatar Luboš Luňák

make update_pch also work with libs in external/

Change-Id: I65b3461fd227e7e997b82a84631bbd5d00b28eb6
Reviewed-on: https://gerrit.libreoffice.org/72520
Tested-by: Jenkins
Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst 8265e36c
......@@ -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
......
......@@ -42,6 +42,9 @@ for x in $headers; do
header=$x
echo updating `echo $header | sed -e s%$root/%%`
module=`readlink -f $header | sed -e s%$root/%% -e s%/.*%%`
if [ "$module" = "external" ]; then
module=external/`readlink -f $header | sed -e s%$root/external/%% -e s%/.*%%`
fi
libname=`echo $header | sed -e s/.*precompiled_// -e s/\.hxx//`
./bin/update_pch "$module" "$libname"
......
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