From 26f4e54156ef6322655872e0fbee10be0a780a7f Mon Sep 17 00:00:00 2001 From: Chris Recoskie Date: Fri, 15 Feb 2008 13:59:39 +0000 Subject: RESOLVED - bug 163672: Other Objects on Win https://bugs.eclipse.org/bugs/show_bug.cgi?id=163672 Patch from Keith Campbell --- .../makegen/gnu/GnuMakefileGenerator.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'build') 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 4ab96a7d177..6fd2ae7c227 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 @@ -1039,9 +1039,23 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { valueList = (List)entry.getValue(); Iterator valueIter = valueList.iterator(); while (valueIter.hasNext()) { - macroBuffer.append(WHITESPACE + ensurePathIsGNUMakeTargetRuleCompatibleSyntax((String)valueIter.next())); + String path = (String) valueIter.next(); + + // These macros will also be used within commands. + // Make all the slashes go forward so they aren't + // interpreted as escapes and get lost. + // See https://bugs.eclipse.org/163672. + path = path.replace('\\', '/'); + + path = ensurePathIsGNUMakeTargetRuleCompatibleSyntax(path); + + macroBuffer.append(WHITESPACE); + macroBuffer.append(path); } - if (iterator.hasNext()) macroBuffer.append(NEWLINE + NEWLINE); + // terminate the macro definition line + macroBuffer.append(NEWLINE); + // leave a blank line before the next macro + if (iterator.hasNext()) macroBuffer.append(NEWLINE); } // For now, just save the buffer that was populated when the rules were created -- cgit v1.2.3