From ab42d16407f7a1e840742293340144b90bd96204 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 22 Mar 2014 20:43:50 +0200 Subject: [PATCH] Fixed|Builder: Interpreting gcc build log output --- distrib/logcleanup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/distrib/logcleanup.py b/distrib/logcleanup.py index daec0ac085..e193a1075b 100755 --- a/distrib/logcleanup.py +++ b/distrib/logcleanup.py @@ -26,25 +26,25 @@ def __init__(self): self.location = '' self.cached = False -c = 0 +clangMode = False + for ln in lines: ln = ln.rstrip() - c += 1 - # What kind of a line do we have? found = re.search('[a-z]+\.pro', ln) if found: print prefix_white(ln) + 'qmake ' + found.group(0) continue - #found = re.search('Entering directory.*/(deng/.*)\'', ln) #if found: # print '\nBuilding in ' + found.group(1) + '...\n' # continue + + if 'clang' in ln: clangMode = True - found = re.search('.*(clang|gcc|g++).*/doomsday/(.*/)([A-Za-z_0-9]+\.c[p]*)', ln) + found = re.search('.*(clang|gcc|g\+\+).*/doomsday/(.*/)([A-Za-z_0-9]+\.c[p]*)', ln) if found: mod = Module() mod.name = found.group(3) @@ -70,7 +70,7 @@ def __init__(self): for ln in erlines: ln = ln.rstrip() - if current: + if current and clangMode: if re.match('^[~^ ]+$', ln): current = None else: @@ -82,7 +82,7 @@ def __init__(self): qmakeOut.append(found.group(2)) continue - found = re.search('^([a-z0-9_/\.]+/[a-z_0-9]+\.[ch][p]*):[0-9]+', ln, re.IGNORECASE) + found = re.search('^([a-z0-9_/\.\-]+/[a-z_0-9]+\.[ch][p]*):[0-9]+', ln, re.IGNORECASE) if found: grp = re.search('/doomsday/(.*/)([a-z_0-9]+\.[ch][p]*)', found.group(1), re.IGNORECASE) if grp: @@ -160,4 +160,4 @@ def __init__(self): # combined = (name, issue.kind, issue.lineNumber, issue.msg) # if combined not in uniq: uniq.append(combined) # for name, kind, num, msg in uniq: -# print name, kind, num, msg \ No newline at end of file +# print name, kind, num, msg