Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Evoy2004-05-28 01:18:19 -0400
committerSean Evoy2004-05-28 01:18:19 -0400
commitb991ccf5e03f1f60c8f5b85d7723a325e99dffc0 (patch)
tree39080a80767bdd0bf8dab980c31b4837ae566d41
parentf9065c3dda983361b0a7640dc15f56029f00cea2 (diff)
downloadorg.eclipse.cdt-b991ccf5e03f1f60c8f5b85d7723a325e99dffc0.tar.gz
org.eclipse.cdt-b991ccf5e03f1f60c8f5b85d7723a325e99dffc0.tar.xz
org.eclipse.cdt-b991ccf5e03f1f60c8f5b85d7723a325e99dffc0.zip
Hopefully this is the last regression on the switch-over to letting Eclipse determine the build order. Make still needs to know about a dep on a referenced project's build goal so it can relink (or do whatever) when that dependencyis out-of-date. Basically I am adding this BACK to the generated makefile, but the rule to build it is a dummy target (so no make complaints).
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java14
2 files changed, 13 insertions, 11 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 e8a59f0f93..4512ab269a 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
@@ -198,16 +198,8 @@ public class GeneratedMakefileBuilder extends ACBuilder {
}
}
- // Scrub the build info of all the projects participating in the build
+ // Scrub the build info the project
info.setRebuildState(false);
- for (int i = 0; i < referencedProjects.length; i++) {
- IProject project = referencedProjects[i];
- IManagedBuildInfo depInfo = ManagedBuildManager.getBuildInfo(project);
- // May not be a managed project
- if (depInfo != null) {
- depInfo.setRebuildState(false);
- }
- }
// Ask build mechanism to compute deltas for project dependencies next time
return referencedProjects;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
index c6a2c53552..e3fe65e59c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
@@ -574,7 +574,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
/*
* Write out the target rule as:
- * targ_<prefix><target>.<extension>: $(OBJS)
+ * targ_<prefix><target>.<extension>: $(OBJS) <refd_project_1 ... refd_project_n>
* @echo 'Building target: $@'
* $(BUILD_TOOL) $(FLAGS) $(OUTPUT_FLAG) $@ $(OBJS) $(USER_OBJS) $(LIB_DEPS)
* @echo 'Finished building: $@'
@@ -585,6 +585,10 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
buffer.append(DOT + extension);
}
buffer.append(COLON + WHITESPACE + "$(OBJS)"); //$NON-NLS-1$
+ Iterator refIter = managedProjectOutputs.listIterator();
+ while (refIter.hasNext()) {
+ buffer.append(WHITESPACE + (String)refIter.next());
+ }
buffer.append(NEWLINE);
buffer.append(TAB + AT + ECHO + WHITESPACE + SINGLE_QUOTE + MESSAGE_START_BUILD + WHITESPACE + OUT_MACRO + SINGLE_QUOTE + NEWLINE);
buffer.append(TAB + cmd + WHITESPACE + flags + WHITESPACE + outflag + WHITESPACE + OUT_MACRO + WHITESPACE + "$(OBJS) $(USER_OBJS) $(LIBS)" + NEWLINE); //$NON-NLS-1$
@@ -598,7 +602,13 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
}
buffer.append(NEWLINE + NEWLINE);
- buffer.append(".PHONY: all clean dependents" + NEWLINE + NEWLINE); //$NON-NLS-1$
+ // Add all the eneded dummy and phony targets
+ buffer.append(".PHONY: all clean dependents" + NEWLINE); //$NON-NLS-1$
+ refIter = managedProjectOutputs.listIterator();
+ while(refIter.hasNext()) {
+ buffer.append((String)refIter.next() + COLON + NEWLINE);
+ }
+ buffer.append(NEWLINE);
// Include makefile.targets supplemental makefile
buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_TARGETS + NEWLINE); //$NON-NLS-1$

Back to the top