Version: 3.4.1 (using KDE 3.5.5 "release 45" , openSUSE 10.2) Compiler: Target: i586-suse-linux OS: Linux (i686) release 2.6.18.2-34-default Hi, the makeactionfilters do not correctly parse the output from the build process for the following example: "g++ -c -o test.o -myoptions -I/mypath test.cpp" If the makeactionfilters parse this line they create the following modified short version for the message view: "compiling mypath (g++)" but it should be "compiling test.cpp (g++)" Based on the kdevelop-3.4.1 release this could be easily fixed by adding "(?:-\S*\s*)*" to the RegExp in kdevelop-3.4.1/parts/outputviews/makeactionfilter.cpp line 76. Change ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), into ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:-\\S*\\s*)*(?:[^/;]*/)*([^/\\s;]+)"), This is a minimal change to resolve the problem but I would rather suggest the following RegExp to match all compile testcases with a single and easier RegExp. (?:^|[^=])\b(gcc|CC|cc|distcc|c\+\+|g\+\+)\s+.*-c.*[/ '\\]+(\w+\.(?:cpp|c)) It's based on the file extensions and supports also MS Windows type path separators which might be an issue in the future. There might be a reason why you don't use file extensions for the regexp in the first place. So sorry if I have overseen something. Anyway here is the proposed patch: --- makeactionfilter.ori.cpp 2007-05-19 21:12:26.000000000 +0200 +++ makeactionfilter.cpp 2007-05-19 21:20:00.000000000 +0200 @@ -72,9 +72,7 @@ MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats() { static ActionFormat formats[] = { - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"), + ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/ '\\\\]+(\\w+\\.(?:cpp|c))"), ActionFormat( i18n("compiling"), 1, 1, "^compiling (.*)" ), //unsermake ActionFormat( i18n("compiling"), 1, 1, "\\[.+%\\] Building .* object (.*)" ), //cmake @@ -172,6 +170,10 @@ "g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " "-I/home/john/src/kde/qt-copy/include -o test.o test.cpp", "compiling", "g++", "test.cpp" ) + << TestItem( // simple qmake compile different option order + "g++ -c -o test.o -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " + "-I/home/john/src/kde/qt-copy/include test.cpp", + "compiling", "g++", "test.cpp" ) << TestItem( // simple qmake link "g++ -o ../bin/test test.o -Wl,-rpath,/home/john/src/kde/qt-copy/lib -L/home/john/src/kde/qt-copy/lib " "-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm",
Created attachment 20636 [details] above mentioned patch see above
SVN commit 668073 by apaku: Use file extension for finding source files that are compiled, patch from Heiko Gerdau, thanks. BUG:145687 M +5 -3 makeactionfilter.cpp --- branches/KDE/3.5/kdevelop/parts/outputviews/makeactionfilter.cpp #668072:668073 @@ -72,9 +72,7 @@ MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats() { static ActionFormat formats[] = { - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"), + ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/'\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"), ActionFormat( i18n("compiling"), 1, 1, "^compiling (.*)" ), //unsermake ActionFormat( i18n("compiling"), 1, 1, "\\[.+%\\] Building .* object (.*)" ), //cmake @@ -172,6 +170,10 @@ "g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " "-I/home/john/src/kde/qt-copy/include -o test.o test.cpp", "compiling", "g++", "test.cpp" ) + << TestItem( // simple qmake compile different option order + "g++ -c -o test.o -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " + "-I/home/john/src/kde/qt-copy/include test.cpp", + "compiling", "g++", "test.cpp" ) << TestItem( // simple qmake link "g++ -o ../bin/test test.o -Wl,-rpath,/home/john/src/kde/qt-copy/lib -L/home/john/src/kde/qt-copy/lib " "-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm",
SVN commit 670868 by apaku: Revert my last commit, it breaks simple gcc lines (somehow the DEBUG define that my configure gets doesn't work). CCBUG:145687 M +3 -5 makeactionfilter.cpp --- branches/KDE/3.5/kdevelop/parts/outputviews/makeactionfilter.cpp #670867:670868 @@ -72,7 +72,9 @@ MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats() { static ActionFormat formats[] = { - ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/'\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"), + ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"), + ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), + ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"), ActionFormat( i18n("compiling"), 1, 1, "^compiling (.*)" ), //unsermake ActionFormat( i18n("compiling"), 1, 1, "\\[.+%\\] Building .* object (.*)" ), //cmake @@ -170,10 +172,6 @@ "g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " "-I/home/john/src/kde/qt-copy/include -o test.o test.cpp", "compiling", "g++", "test.cpp" ) - << TestItem( // simple qmake compile different option order - "g++ -c -o test.o -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " - "-I/home/john/src/kde/qt-copy/include test.cpp", - "compiling", "g++", "test.cpp" ) << TestItem( // simple qmake link "g++ -o ../bin/test test.o -Wl,-rpath,/home/john/src/kde/qt-copy/lib -L/home/john/src/kde/qt-copy/lib " "-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm",
Hi, I had to revert the commit as it causes various of the tests to fail. Heiko I don't fully understand the format of these expressions, would you please see if you can fix the first line starting with a "-" in my last commit message (i.e. the one that uses file extensions for the matching).
Hi Andreas, there are two differences compared to my original patch. You added other file extentions which should be ok, but you have also dropped a blanc in [/ '\\\\]. I have played with different KDevelop and KDE versions currently and thus have broken my compile setup for version 3.4.1. But the following regexp should be ok again. At least for the included test cases. ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/ '\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"),
aaah, the problem is that you provided the patch inline, it would've been better to provide it as attachment. If you select the patch-lines you will see that the one whitespace is not in there.
SVN commit 671038 by apaku: Fix the patch, a whitespace got lost because the patch was provided inline. BUG:145687 M +5 -3 makeactionfilter.cpp --- branches/KDE/3.5/kdevelop/parts/outputviews/makeactionfilter.cpp #671037:671038 @@ -72,9 +72,7 @@ MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats() { static ActionFormat formats[] = { - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"), - ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"), + ActionFormat( i18n("compiling"), 1, 2, "(?:^|[^=])\\b(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\s+.*-c.*[/ '\\\\]+(\\w+\\.(?:cpp|CPP|c|C|cxx|CXX|cs|java|hpf|f|F|f90|F90|f95|F95))"), ActionFormat( i18n("compiling"), 1, 1, "^compiling (.*)" ), //unsermake ActionFormat( i18n("compiling"), 1, 1, "\\[.+%\\] Building .* object (.*)" ), //cmake @@ -172,6 +170,10 @@ "g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " "-I/home/john/src/kde/qt-copy/include -o test.o test.cpp", "compiling", "g++", "test.cpp" ) + << TestItem( // simple qmake compile different option order + "g++ -c -o test.o -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/home/john/src/kde/qt-copy/mkspecs/default -I. " + "-I/home/john/src/kde/qt-copy/include test.cpp", + "compiling", "g++", "test.cpp" ) << TestItem( // simple qmake link "g++ -o ../bin/test test.o -Wl,-rpath,/home/john/src/kde/qt-copy/lib -L/home/john/src/kde/qt-copy/lib " "-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm",
I provided the patch inline and as attachment. See Comment#1 directly after my original post. And what do you mean by "if you select the patch-lines you will see that the one whitespace is not in there" ?? If I look above at my original post I see the whitespace and after select and copy the lines from the inline patch I have the whitespace still in there. Anyway, whatever has caused the confusion, I'm glad that it's working now. Thanks Heiko