Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorLeo Treggiari2005-07-06 14:57:21 +0000
committerLeo Treggiari2005-07-06 14:57:21 +0000
commitb6b99ac40a5a6f74ed8c6314a6fd28a283832ed9 (patch)
tree8fbc9a952432d146636f5ed481340295794ff936 /build
parent61aa8cb62cda8cc9df1895cdbf3829d3696ce903 (diff)
downloadorg.eclipse.cdt-b6b99ac40a5a6f74ed8c6314a6fd28a283832ed9.tar.gz
org.eclipse.cdt-b6b99ac40a5a6f74ed8c6314a6fd28a283832ed9.tar.xz
org.eclipse.cdt-b6b99ac40a5a6f74ed8c6314a6fd28a283832ed9.zip
Fix problem with building when a referenced project has changed.
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java28
1 files changed, 23 insertions, 5 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
index 9ce42ef1177..8c1b0084315 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
@@ -154,9 +154,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
if (changedResource instanceof IFolder) {
return true;
} else {
- String name = changedResource.getName();
- String ext = changedResource.getFileExtension();
-
+ String name = changedResource.getName();
if ((!name.equals(buildGoalName) &&
// TODO: Also need to check for secondary outputs
(changedResource.isDerived() ||
@@ -358,11 +356,32 @@ public class GeneratedMakefileBuilder extends ACBuilder {
delta.accept(visitor);
if (visitor.shouldBuildFull()) {
outputTrace(getProject().getName(), "Incremental build requested, full build needed"); //$NON-NLS-1$
- fullBuild(info, generator, monitor);
+ fullBuild(info, generator, monitor);
} else if (visitor.shouldBuildIncr()) {
outputTrace(getProject().getName(), "Incremental build requested"); //$NON-NLS-1$
incrementalBuild(delta, info, generator, monitor);
}
+ else if (referencedProjects != null) {
+ // Also check to see is any of the dependent projects changed
+ for (int i=0; i<referencedProjects.length; i++) {
+ IProject ref = referencedProjects[i];
+ IResourceDelta refDelta = getDelta(ref);
+ if (refDelta == null) {
+ outputTrace(getProject().getName(), "Incremental build because of changed referenced project"); //$NON-NLS-1$
+ incrementalBuild(delta, info, generator, monitor);
+ } else {
+ int refKind = refDelta.getKind();
+ if (refKind != IResourceDelta.NO_CHANGE) {
+ int refFlags = refDelta.getFlags();
+ if (!(refKind == IResourceDelta.CHANGED &&
+ refFlags == IResourceDelta.OPEN)) {
+ outputTrace(getProject().getName(), "Incremental build because of changed referenced project"); //$NON-NLS-1$
+ incrementalBuild(delta, info, generator, monitor);
+ }
+ }
+ }
+ }
+ }
}
}
// Scrub the build info the project
@@ -815,7 +834,6 @@ public class GeneratedMakefileBuilder extends ACBuilder {
// then: don't invoke the prebuild step, which should be run only if
// something needs to be built in the main build
// else: invoke the prebuild step and the main build step
- boolean quit = false;
premakeArgs.add("-q"); //$NON-NLS-1$
premakeArgs.add("main-build"); //$NON-NLS-1$
premakeTargets = (String[]) premakeArgs.toArray(new String[premakeArgs.size()]);

Back to the top