|
|
23fcb50 |
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java
|
|
|
23fcb50 |
index 261fef6..ea98501 100644
|
|
|
23fcb50 |
--- a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java
|
|
|
23fcb50 |
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java
|
|
|
23fcb50 |
@@ -1245,6 +1245,16 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|
|
23fcb50 |
IPath buildCommand = buildInfo.getBuildCommand();
|
|
|
23fcb50 |
String defaultBuildCommand = buildCommand.toString();
|
|
|
23fcb50 |
String buildArguments = buildInfo.getBuildArguments();
|
|
|
23fcb50 |
+
|
|
|
23fcb50 |
+ // Bug #351660 - reset targets to a single dummy target so that
|
|
|
23fcb50 |
+ // we will never be able to find any of the new targets we are about to
|
|
|
23fcb50 |
+ // create and thus avoid an extraneous event notification on a change to
|
|
|
23fcb50 |
+ // the MakeTarget. The dummy target should have an invalid name for
|
|
|
23fcb50 |
+ // a normal make target.
|
|
|
23fcb50 |
+ IMakeTarget dummyTarget = makeTargetManager.createTarget(
|
|
|
23fcb50 |
+ project, "\ndummyTarget\n", targetBuildID); //$NON-NLS-1$
|
|
|
23fcb50 |
+ makeTargetManager.setTargets(project, new IMakeTarget[]{dummyTarget});
|
|
|
23fcb50 |
+
|
|
|
23fcb50 |
for (int i = 0; i < targets.length; i++) {
|
|
|
23fcb50 |
target = targets[i].getTarget();
|
|
|
23fcb50 |
String targetName = target.toString();
|
|
|
23fcb50 |
@@ -1264,7 +1274,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|
|
23fcb50 |
makeTarget.setBuildAttribute(IMakeTarget.BUILD_ARGUMENTS, buildArguments);
|
|
|
23fcb50 |
makeTarget.setBuildAttribute(IMakeTarget.BUILD_COMMAND, defaultBuildCommand);
|
|
|
23fcb50 |
|
|
|
23fcb50 |
- makeTarget.setBuildAttribute(GENERATED_TARGET, "true");
|
|
|
23fcb50 |
+ makeTarget.setBuildAttribute(GENERATED_TARGET, "true"); //$NON-NLS-1$
|
|
|
23fcb50 |
makeTarget.setBuildAttribute(IMakeTarget.BUILD_TARGET,
|
|
|
23fcb50 |
targetName);
|
|
|
23fcb50 |
|