fix bug 9142. Fix PRODUCT_INCLUDE macros problems with deps tracking on cpp.exe
authortimkelly
Mon, 01 Jun 2009 14:02:36 -0500
changeset 193 8b34b48b483f
parent 192 305cbc599919
child 195 ab6393bd82aa
fix bug 9142. Fix PRODUCT_INCLUDE macros problems with deps tracking on cpp.exe
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java	Thu May 28 15:19:58 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java	Mon Jun 01 14:02:36 2009 -0500
@@ -2828,6 +2828,9 @@
 				int firstInclude = rcompCmd.indexOf("-I");
 				int dashU = rcompCmd.lastIndexOf("-u");
 				int dashO = rcompCmd.lastIndexOf("-o$@");
+				if (dashO < 0){
+					dashO = rcompCmd.lastIndexOf("-o\"$@\"");
+				}
 				if (firstInclude < 0 || dashU < 0 || dashO < 0) {
 					throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, 0, "Failed trying to build cpp command", null)); //$NON-NLS-1$
 				}
@@ -2910,7 +2913,7 @@
 					// cleanup the __PRODUCT_INCLUDE__ macro if necessary
 					macros = macros.replaceFirst("\\\\\"", "\"<" + makefilePath.getDevice());
 					macros = macros.replaceFirst("\\\\\"", ">\"");
-					macros = macros.replaceAll("\\\\", "\\\\\\\\");
+					macros = macros.replaceAll("\\\\", "/");
 
 					newRule = newRule.replaceFirst("-u ", macros);
 				}