core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java
equal
deleted
inserted
replaced
19 import org.osgi.framework.Version; |
19 import org.osgi.framework.Version; |
20 |
20 |
21 import com.nokia.carbide.cpp.epoc.engine.model.sbv.ISBVView; |
21 import com.nokia.carbide.cpp.epoc.engine.model.sbv.ISBVView; |
22 import com.nokia.carbide.cpp.epoc.engine.preprocessor.*; |
22 import com.nokia.carbide.cpp.epoc.engine.preprocessor.*; |
23 import com.nokia.carbide.cpp.internal.sdk.core.model.SymbianMissingSDKFactory; |
23 import com.nokia.carbide.cpp.internal.sdk.core.model.SymbianMissingSDKFactory; |
|
24 import com.nokia.carbide.cpp.internal.sdk.core.model.SymbianSDK; |
24 import com.nokia.carbide.cpp.sdk.core.*; |
25 import com.nokia.carbide.cpp.sdk.core.*; |
25 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.BasicIncludeFileLocator; |
26 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.BasicIncludeFileLocator; |
26 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.MacroScanner; |
27 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.MacroScanner; |
27 |
28 |
28 public class SymbianBuildContext implements ISymbianBuildContext { |
29 public class SymbianBuildContext implements ISymbianBuildContext { |
376 synchronized (this) { |
377 synchronized (this) { |
377 |
378 |
378 List<IDefine> macros = new ArrayList<IDefine>(); |
379 List<IDefine> macros = new ArrayList<IDefine>(); |
379 Map<String, IDefine> namedMacros = new HashMap<String, IDefine>(); |
380 Map<String, IDefine> namedMacros = new HashMap<String, IDefine>(); |
380 File prefixFile = getSDK().getPrefixFile(); |
381 File prefixFile = getSDK().getPrefixFile(); |
|
382 |
|
383 if (prefixFile == null){ |
|
384 // Check that the prefix file may have become available since the SDK was scanned last. |
|
385 // This can happen, for e.g., if the user opens the IDE _then_ does a subst on a drive that already has an SDK entry. |
|
386 IPath prefixCheck = ((SymbianSDK)getSDK()).getPrefixFromVariantCfg(); |
|
387 if (prefixCheck != null){ |
|
388 prefixFile = prefixCheck.toFile(); |
|
389 getSDK().setPrefixFile(prefixCheck); |
|
390 } |
|
391 } |
|
392 |
381 if (prefixFile != null) { |
393 if (prefixFile != null) { |
382 |
394 |
383 // add any BSF/SBV includes so the headers are picked up from the correct location |
395 // add any BSF/SBV includes so the headers are picked up from the correct location |
384 List<File> systemPaths = new ArrayList<File>(); |
396 List<File> systemPaths = new ArrayList<File>(); |
385 IBSFPlatform bsfPlat = getSDK().getBSFCatalog().findPlatform(platform); |
397 IBSFPlatform bsfPlat = getSDK().getBSFCatalog().findPlatform(platform); |