for gcce and armv5 based targets for sbsv2, if the compiler prefix does not exist on disk for a particular configuraiton, attempt to perform
authortimkelly
Fri, 27 Aug 2010 16:34:38 -0500
changeset 1906 6f11f5393a5c
parent 1905 a27f1d43992b
child 1908 8b428a8a3473
for gcce and armv5 based targets for sbsv2, if the compiler prefix does not exist on disk for a particular configuraiton, attempt to perform a raptor query to reubuild the config data.
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContextDataCache.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2ConfigQueryData.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBSv2BuildInfo.java
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java	Fri Aug 27 14:53:15 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java	Fri Aug 27 16:34:38 2010 -0500
@@ -142,6 +142,9 @@
 		if (sbsv2Alias.toUpperCase().contains(TOOLCHAIN_GCCE) ||
 			sbsv2Alias.toUpperCase().contains(TOOLCHAIN_ARM)) {
 			if (configQueryData != null) {
+				if (configQueryData.getBuildPrefix() != null && !(new File(configQueryData.getBuildPrefix()).exists())){
+					this.configQueryData = setConfigQueryData(sdk, getSBSv2Alias());
+				}
 				return new Path(configQueryData.getBuildPrefix());
 			}
 		} 
@@ -160,7 +163,7 @@
 
 	public List<IDefine> getCompilerPreincludeDefines() {
 		IPath prefixFile = getCompilerPrefixFile();
-		if (prefixFile == null || !prefixFile.toFile().exists()) {
+		if (prefixFile == null) {
 			return getCachedData().getCompilerMacros(null);
 		}
 		
@@ -391,11 +394,15 @@
 	 */
 	public IPath getPrefixFromVariantCfg(){
 		ISBSv2BuildInfo sbsv2BldInfo = ((ISBSv2BuildInfo)getSDK().getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER));
+		if (sbsv2BldInfo.getPrefixFromVariantCfg().toOSString().length() == 0){
+			return null;
+		}
 		return sbsv2BldInfo.getPrefixFromVariantCfg();
 	}
 
 	public List<IDefine> getBuildMacros() {
 		ISBSv2BuildInfo sbsv2BldInfo = ((ISBSv2BuildInfo)getSDK().getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER));
+		
 		Map<String, String> buildMacroMap = sbsv2BldInfo.getBuildMacros(getSBSv2Alias());
 		List<IDefine> defines = new ArrayList<IDefine>();
 		for (String macroName : buildMacroMap.keySet()){
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContextDataCache.java	Fri Aug 27 14:53:15 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContextDataCache.java	Fri Aug 27 16:34:38 2010 -0500
@@ -159,7 +159,7 @@
 		
 		boolean buildCache = false;
 		
-		if (hrhFileInfo == null) {
+		if (hrhFileInfo == null || hrhFileInfo.getFiles().length == 0) {
 			// hasn't been built yet, or was flushed
 			buildCache = true;
 		} else {
@@ -311,7 +311,7 @@
 		
 		compilerPrefixFile = prefixFile;
 
-		if (compilerPrefixFileInfo == null ||
+		if (compilerPrefixFileInfo == null || compilerPrefixFile == null ||
 				compilerPrefixFileInfo.anyChanged()) {
 
 			changed = true;
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2ConfigQueryData.java	Fri Aug 27 14:53:15 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2ConfigQueryData.java	Fri Aug 27 16:34:38 2010 -0500
@@ -1,5 +1,6 @@
 package com.nokia.carbide.cpp.internal.api.sdk.sbsv2;
 
+import java.io.File;
 import java.io.StringReader;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -181,6 +182,11 @@
 										if (valueNode != null) {
 											value = valueNode.getNodeValue();
 										}
+										if (name.equals("__PRODUCT_INCLUDE__")){
+											File f = new File(value.replaceAll("\"", ""));
+											if (!f.exists())
+												continue; // Don't add a product include for non-existent HRH
+										}
 										buildMacros.put(name, value);
 									} else if (buildChild.getNodeName().equals("preinclude")){
 										buildPrefix = attribs.getNamedItem("file").getNodeValue();
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBSv2BuildInfo.java	Fri Aug 27 14:53:15 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBSv2BuildInfo.java	Fri Aug 27 16:34:38 2010 -0500
@@ -248,7 +248,8 @@
 	
 	public Map<String, String> getBuildMacros(String buildAlias) {
 		Map<String, String> buildMacros = cachedBuildMacros.get(buildAlias);
-		if (buildMacros == null) {
+		
+		if (buildMacros == null || buildMacros.size() == 0) {
 			buildMacros = new HashMap<String, String>();
 			synchronized (cachedBuildMacros) {
 				if (sbsv2FilteredContexts == null || sbsv2FilteredContexts.size() == 0) {
@@ -272,7 +273,7 @@
 	 * @return A path object, or null if the variant.cfg does not exist. This routine does not check to see if the returned path exists.
 	 */
 	public IPath getPrefixFromVariantCfg(){
-		if (cachedVariantHRHFile == null) {
+		if (cachedVariantHRHFile == null || cachedVariantHRHFile.toOSString().length() == 0) {
 			if (sbsv2FilteredContexts == null || sbsv2FilteredContexts.size() == 0) {
 				getFilteredBuildConfigurations();
 			}