rpms/eclipse-cdt/F-11 eclipse-cdt-autotools-bug281582.patch, NONE, 1.1 eclipse-cdt.spec, 1.122, 1.123 eclipse-cdt-autotools-bug280117.patch, 1.1, NONE

Jeff Johnston jjohnstn at fedoraproject.org
Fri Jun 26 22:20:27 UTC 2009


Author: jjohnstn

Update of /cvs/extras/rpms/eclipse-cdt/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10120

Modified Files:
	eclipse-cdt.spec 
Added Files:
	eclipse-cdt-autotools-bug281582.patch 
Removed Files:
	eclipse-cdt-autotools-bug280117.patch 
Log Message:

* Fri Jun 26 2009 Jeff Johnston <jjohnstn at redhat.com> 5.0.2-4
- Resolves #281582.



eclipse-cdt-autotools-bug281582.patch:

--- NEW FILE eclipse-cdt-autotools-bug281582.patch ---
diff -up ./src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java.fix ./src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java
--- ./src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java.fix	2009-06-26 18:11:13.000000000 -0400
+++ ./src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java	2009-06-26 18:11:17.000000000 -0400
@@ -105,8 +105,8 @@ public class AutotoolsScannerInfo implem
 					String id = options[i].getId();
 					if (id.indexOf("builddir") > 0) { // $NON-NLS-1$
 						runPath = makefile.getProject().getLocation().append(value.trim());
+						done = true;
 					}
-					done = true;
 				}
 			} catch (BuildException e) {
 				// do nothing
@@ -205,22 +205,50 @@ public class AutotoolsScannerInfo implem
 			// refer to it this way.
 			String out = buildFile(filePath, makefile, info);
 			try {
-				String regex1 = "^Making.*in.*" + dir.lastSegment(); // $NON-NLS-1$
-				Pattern p = Pattern.compile(regex1, Pattern.MULTILINE);
-				Matcher m = p.matcher(out);
-				if (m.find()) {
-					String substr2 = out.substring(m.end());
-					String regex2 = "^make.*Entering directory.*`(.*)'"; // $NON-NLS-1$
-					Pattern p2 = Pattern.compile(regex2, Pattern.MULTILINE);
-					Matcher m2 = p2.matcher(substr2);
-					if (m2.find()) {
-						dirName = m2.group(1);
-						String substr3 = substr2.substring(m2.start());
-						String regex3 = "^.*gcc.*-I.*" + filePath.lastSegment(); // $NON-NLS-1$
+				boolean topLevel = dir.equals(project.getFullPath());
+				Pattern p = null;
+				Matcher m = null;
+				if (!topLevel) {
+					String regex1 = "^Making.*in.*" + dir.lastSegment(); // $NON-NLS-1$
+					p = Pattern.compile(regex1, Pattern.MULTILINE);
+					m = p.matcher(out);
+				}
+				if (topLevel || m.find()) {
+					Pattern p2 = null;
+					Matcher m2 = null;
+					String substr2 = out;
+					if (!topLevel) {
+						substr2 = out.substring(m.end());
+						String regex2 = "^make.*Entering directory.*`(.*)'"; // $NON-NLS-1$
+						p2 = Pattern.compile(regex2, Pattern.MULTILINE);
+						m2 = p2.matcher(substr2);
+					}
+					if (topLevel || m2.find()) {
+						String substr3 = null;
+						if (!topLevel) {
+							dirName = m2.group(1);
+							substr3 = substr2.substring(m2.start());
+						} else {
+							dirName = "";
+							substr3 = out;
+						}
+						// We need to test for both gcc and g++ compilers.
+						String regex3 = "^.*gcc.*?-I.*?" + filePath.lastSegment(); // $NON-NLS-1$
+						String regex4 = "^.*g[+][+].*?-I.*?" + filePath.lastSegment(); // $NON-NLS-1$
+						// Replace all continuation markers so we don't have to worry about newlines in
+						// the middle of a compilation string.
+						substr3 = substr3.replaceAll("\\\\\\n", "");
 						Pattern p3 = Pattern.compile(regex3, Pattern.MULTILINE);
 						Matcher m3 = p3.matcher(substr3);
 						if (m3.find())
 							compilationString = substr3.substring(m3.start(),m3.end());
+						else {
+							String substr4 = substr3;
+							Pattern p4 = Pattern.compile(regex4, Pattern.MULTILINE);
+							Matcher m4 = p4.matcher(substr4);
+							if (m4.find())
+								compilationString = substr3.substring(m4.start(),m4.end());
+						}
 					}
 				} else if (!out.equals("")) {
 					compilationString = "";


Index: eclipse-cdt.spec
===================================================================
RCS file: /cvs/extras/rpms/eclipse-cdt/F-11/eclipse-cdt.spec,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -p -r1.122 -r1.123
--- eclipse-cdt.spec	15 Jun 2009 21:23:08 -0000	1.122
+++ eclipse-cdt.spec	26 Jun 2009 22:19:56 -0000	1.123
@@ -20,7 +20,7 @@ Epoch: 1
 Summary:        Eclipse C/C++ Development Tools (CDT) plugin
 Name:           eclipse-cdt
 Version:        %{majmin}.%{micro}
-Release:        3%{?dist}
+Release:        4%{?dist}
 License:        EPL and CPL
 Group:          Development/Tools
 URL:            http://www.eclipse.org/cdt
@@ -94,9 +94,9 @@ Patch15: %{name}-managedConfigurations.p
 # the .cproject file.  This patch prevents the problem.
 Patch16: %{name}-managedConfigurations-fix.patch
 
-# Following is a patch for Eclipse bug 280117 which fixes the Autotools
+# Following is a patch for Eclipse bugs 280117 and 281582 which fixes the Autotools
 # ScannerInfo.
-Patch17: %{name}-autotools-bug280117.patch
+Patch17: %{name}-autotools-bug281582.patch
 
 BuildRequires: eclipse-pde
 BuildRequires: eclipse-mylyn >= 3.0
@@ -573,6 +573,9 @@ fi
 %endif
 
 %changelog
+* Fri Jun 26 2009 Jeff Johnston <jjohnstn at redhat.com> 5.0.2-4
+- Resolves #281582.
+
 * Mon Jun 15 2009 Jeff Johnston <jjohnstn at redhat.com> 5.0.2-3
 - Resolves #280117.
 


--- eclipse-cdt-autotools-bug280117.patch DELETED ---




More information about the fedora-extras-commits mailing list