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): ...@@ -520,7 +520,9 @@ def sort_by_category(list, root, module, filter_local):
def parse_makefile(groups, lines, lineno, lastif, ifstack): def parse_makefile(groups, lines, lineno, lastif, ifstack):
inobjects = False inobjects = False
ingeneratedobjects = False
inelse = False inelse = False
suffix = 'cxx'
os_cond_re = re.compile('(ifeq|ifneq)\s*\(\$\(OS\)\,(\w*)\)') os_cond_re = re.compile('(ifeq|ifneq)\s*\(\$\(OS\)\,(\w*)\)')
line = lines[lineno] line = lines[lineno]
...@@ -542,12 +544,21 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack): ...@@ -542,12 +544,21 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack):
if line == '))': if line == '))':
inobjects = False inobjects = False
ingeneratedobjects = False
elif 'add_exception_objects' in line or \ elif 'add_exception_objects' in line or \
'add_cxxobject' in line: 'add_cxxobject' in line:
inobjects = True inobjects = True
#print('inobjects') #print('inobjects')
#if ifstack and not SILENT: #if ifstack and not SILENT:
#sys.stderr.write('Sources in a conditional, ignoring for now.\n') #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'): elif line.startswith('if'):
lineno = parse_makefile(groups, lines, lineno, line, ifstack+1) lineno = parse_makefile(groups, lines, lineno, line, ifstack+1)
continue continue
...@@ -557,10 +568,10 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack): ...@@ -557,10 +568,10 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack):
continue continue
elif line.startswith('else'): elif line.startswith('else'):
inelse = True inelse = True
elif inobjects: elif inobjects or ingeneratedobjects:
if EXCLUDE_SYSTEM and ifstack: if EXCLUDE_SYSTEM and ifstack:
continue continue
file = line + '.cxx' file = line + '.' + suffix
if ',' in line or '(' in line or ')' in line: if ',' in line or '(' in line or ')' in line:
#print('passing: ' + line) #print('passing: ' + line)
pass # $if() probably, or something similar pass # $if() probably, or something similar
...@@ -582,6 +593,8 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack): ...@@ -582,6 +593,8 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack):
if osname not in groups: if osname not in groups:
groups[osname] = [] groups[osname] = []
if ingeneratedobjects:
file = 'workdir/' + file
groups[osname].append(file) groups[osname].append(file)
return groups return groups
......
...@@ -42,6 +42,9 @@ for x in $headers; do ...@@ -42,6 +42,9 @@ for x in $headers; do
header=$x header=$x
echo updating `echo $header | sed -e s%$root/%%` echo updating `echo $header | sed -e s%$root/%%`
module=`readlink -f $header | sed -e s%$root/%% -e s%/.*%%` 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//` libname=`echo $header | sed -e s/.*precompiled_// -e s/\.hxx//`
./bin/update_pch "$module" "$libname" ./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