140 public IPath getCompilerPrefixFile() { |
140 public IPath getCompilerPrefixFile() { |
141 |
141 |
142 if (sbsv2Alias.toUpperCase().contains(TOOLCHAIN_GCCE) || |
142 if (sbsv2Alias.toUpperCase().contains(TOOLCHAIN_GCCE) || |
143 sbsv2Alias.toUpperCase().contains(TOOLCHAIN_ARM)) { |
143 sbsv2Alias.toUpperCase().contains(TOOLCHAIN_ARM)) { |
144 if (configQueryData != null) { |
144 if (configQueryData != null) { |
|
145 if (configQueryData.getBuildPrefix() != null && !(new File(configQueryData.getBuildPrefix()).exists())){ |
|
146 this.configQueryData = setConfigQueryData(sdk, getSBSv2Alias()); |
|
147 } |
145 return new Path(configQueryData.getBuildPrefix()); |
148 return new Path(configQueryData.getBuildPrefix()); |
146 } |
149 } |
147 } |
150 } |
148 |
151 |
149 // fallback for WINSCW, MSVC, etc. |
152 // fallback for WINSCW, MSVC, etc. |
158 return getCachedData().getPrefixFileIncludes(); |
161 return getCachedData().getPrefixFileIncludes(); |
159 } |
162 } |
160 |
163 |
161 public List<IDefine> getCompilerPreincludeDefines() { |
164 public List<IDefine> getCompilerPreincludeDefines() { |
162 IPath prefixFile = getCompilerPrefixFile(); |
165 IPath prefixFile = getCompilerPrefixFile(); |
163 if (prefixFile == null || !prefixFile.toFile().exists()) { |
166 if (prefixFile == null) { |
164 return getCachedData().getCompilerMacros(null); |
167 return getCachedData().getCompilerMacros(null); |
165 } |
168 } |
166 |
169 |
167 return getCachedData().getCompilerMacros(prefixFile); |
170 return getCachedData().getCompilerMacros(prefixFile); |
168 } |
171 } |
389 * Get the full path to the prefix file defined under \epoc32\tools\variant\variant.cfg |
392 * Get the full path to the prefix file defined under \epoc32\tools\variant\variant.cfg |
390 * @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. |
393 * @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. |
391 */ |
394 */ |
392 public IPath getPrefixFromVariantCfg(){ |
395 public IPath getPrefixFromVariantCfg(){ |
393 ISBSv2BuildInfo sbsv2BldInfo = ((ISBSv2BuildInfo)getSDK().getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER)); |
396 ISBSv2BuildInfo sbsv2BldInfo = ((ISBSv2BuildInfo)getSDK().getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER)); |
|
397 if (sbsv2BldInfo.getPrefixFromVariantCfg().toOSString().length() == 0){ |
|
398 return null; |
|
399 } |
394 return sbsv2BldInfo.getPrefixFromVariantCfg(); |
400 return sbsv2BldInfo.getPrefixFromVariantCfg(); |
395 } |
401 } |
396 |
402 |
397 public List<IDefine> getBuildMacros() { |
403 public List<IDefine> getBuildMacros() { |
398 ISBSv2BuildInfo sbsv2BldInfo = ((ISBSv2BuildInfo)getSDK().getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER)); |
404 ISBSv2BuildInfo sbsv2BldInfo = ((ISBSv2BuildInfo)getSDK().getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER)); |
|
405 |
399 Map<String, String> buildMacroMap = sbsv2BldInfo.getBuildMacros(getSBSv2Alias()); |
406 Map<String, String> buildMacroMap = sbsv2BldInfo.getBuildMacros(getSBSv2Alias()); |
400 List<IDefine> defines = new ArrayList<IDefine>(); |
407 List<IDefine> defines = new ArrayList<IDefine>(); |
401 for (String macroName : buildMacroMap.keySet()){ |
408 for (String macroName : buildMacroMap.keySet()){ |
402 defines.add(DefineFactory.createDefine(macroName, buildMacroMap.get(macroName))); |
409 defines.add(DefineFactory.createDefine(macroName, buildMacroMap.get(macroName))); |
403 } |
410 } |