1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

bug 312835: CDT build settings which are set at the folder level are

ignored in certain situations.
Based on patch from MJ <jensem2@yahoo.com>
This commit is contained in:
Andrew Gvozdev 2011-07-02 00:41:56 -04:00
parent 4933b90d3e
commit 4057829075

View file

@ -1207,16 +1207,17 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(SRC_LISTS) + NEWLINE);
buffer.append("-include sources.mk" + NEWLINE); //$NON-NLS-1$
// add an include for each subdir
buffer.append("-include subdir.mk" + NEWLINE); //$NON-NLS-1$
for (IResource res : getSubdirList()) {
IContainer subDir = (IContainer)res;
// Add includes for each subdir in child-subdir-first order (required for makefile rule matching to work).
List<String> subDirList = new ArrayList<String>();
for (IContainer subDir : getSubdirList()) {
IPath projectRelativePath = subDir.getProjectRelativePath();
if(!projectRelativePath.toString().equals("")) //$NON-NLS-1$
buffer.append("-include " + escapeWhitespaces(projectRelativePath.toString()) + SEPARATOR + "subdir.mk"+ NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
subDirList.add(0, projectRelativePath.toString());
}
for (String dir : subDirList) {
buffer.append("-include " + escapeWhitespaces(dir) + SEPARATOR + "subdir.mk"+ NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
}
buffer.append("-include subdir.mk" + NEWLINE); //$NON-NLS-1$
buffer.append("-include objects.mk" + NEWLINE + NEWLINE); //$NON-NLS-1$