mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
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).
This commit is contained in:
parent
f9065c3dda
commit
b991ccf5e0
2 changed files with 13 additions and 11 deletions
|
@ -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;
|
||||
|
|
|
@ -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$
|
||||
|
|
Loading…
Add table
Reference in a new issue