From 874a0abb605b49836ed8ce691c1946473ef20ce5 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Jun 26 2009 22:16:18 +0000 Subject: * Fri Jun 26 2009 Jeff Johnston 5.0.2-4 - Resolves #281582. --- diff --git a/eclipse-cdt-autotools-bug280117.patch b/eclipse-cdt-autotools-bug280117.patch deleted file mode 100644 index f166f35..0000000 --- a/eclipse-cdt-autotools-bug280117.patch +++ /dev/null @@ -1,13 +0,0 @@ -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-15 15:41:38.000000000 -0400 -+++ ./src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java 2009-06-15 15:42:10.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 diff --git a/eclipse-cdt-autotools-bug281582.patch b/eclipse-cdt-autotools-bug281582.patch new file mode 100644 index 0000000..905f749 --- /dev/null +++ b/eclipse-cdt-autotools-bug281582.patch @@ -0,0 +1,76 @@ +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 = ""; diff --git a/eclipse-cdt.spec b/eclipse-cdt.spec index 97832a3..0d6a876 100644 --- a/eclipse-cdt.spec +++ b/eclipse-cdt.spec @@ -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.patch # 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 5.0.2-4 +- Resolves #281582. + * Mon Jun 15 2009 Jeff Johnston 5.0.2-3 - Resolves #280117.