when adding prefix file for indexer and preprocessor for build, make sure to add the .var prefix file if different from the default.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultIncludeFileLocator.java Tue May 12 14:17:38 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultIncludeFileLocator.java Tue May 12 16:06:57 2009 -0500
@@ -51,6 +51,9 @@
systemPaths.add(cpi.getAbsoluteBldInfPath().removeLastSegments(1).toFile());
}
}
+
+ IBSFPlatform bsfplatform = buildContext.getSDK().getBSFCatalog().findPlatform(buildContext.getPlatformString());
+ ISBVPlatform sbvPlatform = buildContext.getSDK().getSBVCatalog().findPlatform(buildContext.getPlatformString());
// look in the epoc32 directory of the SDK
IPath includePath = buildContext.getSDK().getIncludePath();
@@ -59,8 +62,6 @@
File dir;
// get additional include directories from BSF platform, if defined
- IBSFPlatform bsfplatform = buildContext.getSDK().getBSFCatalog().findPlatform(buildContext.getPlatformString());
- ISBVPlatform sbvPlatform = buildContext.getSDK().getSBVCatalog().findPlatform(buildContext.getPlatformString());
if (bsfplatform != null) {
IPath[] systemIncludePaths = bsfplatform.getSystemIncludePaths();
for (IPath path : systemIncludePaths) {
@@ -117,6 +118,13 @@
// also search files in same folder as variant.hrh
File prefix = buildContext.getSDK().getPrefixFile();
+ if (sbvPlatform != null){
+ // might be an alternate HRH file to use
+ IPath varVarHRH = sbvPlatform.getBuildVariantHRHFile();
+ if (!varVarHRH.toFile().equals(prefix) && varVarHRH.toFile().exists()){
+ prefix = varVarHRH.toFile();
+ }
+ }
if (prefix != null) {
systemPaths.add(prefix.getParentFile());
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Tue May 12 14:17:38 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Tue May 12 16:06:57 2009 -0500
@@ -78,9 +78,7 @@
import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource;
import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
-import com.nokia.carbide.cpp.sdk.core.IBSFPlatform;
-import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.sdk.core.*;
import com.nokia.cpp.internal.api.utils.core.FileUtils;
import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
@@ -2738,7 +2736,16 @@
}
// add the compiler prefix file if any
+ ISBVPlatform sbvPlatform = config.getSDK().getSBVCatalog().findPlatform(config.getPlatformString());
File sdkPrefix = config.getSDK().getPrefixFile();
+ if (sbvPlatform != null){
+ // might be an alternate HRH file to use
+ IPath varVarHRH = sbvPlatform.getBuildVariantHRHFile();
+ if (!varVarHRH.toFile().equals(sdkPrefix) && varVarHRH.toFile().exists()){
+ sdkPrefix = varVarHRH.toFile();
+ }
+ }
+
if (sdkPrefix != null && sdkPrefix.exists()) {
newRule = newRule + "-include \"" + sdkPrefix.getAbsolutePath() + "\" ";
}