]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Changed the code to read the correct configuration name in target.txt file;
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 8 Jul 2006 10:02:19 +0000 (10:02 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 8 Jul 2006 10:02:19 +0000 (10:02 +0000)
Fixed an issue which caused building platform with un-defined tools.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@833 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainMap.java

index f91002ace195995e14a32894826c639b91d0527e..88e1a20e5e93a2089219ee5fa371e702ce4e64d6 100644 (file)
@@ -267,7 +267,7 @@ public class FrameworkBuildTask extends Task{
             else {\r
                 envToolChainInfo.addTargets(str);\r
             }\r
-            str = getValue("TAGNAME", targetFileInfo);\r
+            str = getValue("TOOL_CHAIN_TAG", targetFileInfo);\r
             if (str == null || str.trim().equals("")) {\r
                 envToolChainInfo.addTagnames("*");\r
             }\r
@@ -283,7 +283,7 @@ public class FrameworkBuildTask extends Task{
             }\r
             GlobalData.setToolChainEnvInfo(envToolChainInfo);\r
             \r
-            str = getValue("TOOLS_DEFINITION_FILE", targetFileInfo);\r
+            str = getValue("TOOL_CHAIN_CONF", targetFileInfo);\r
             if (str != null) {\r
                 toolsDefFilename = str;\r
             }\r
index 1299e11059a27aac7017ae8c05a41168c3f4624e..6dd0a4fff0d55c82235152ce6341c9c0294b9264 100644 (file)
@@ -242,6 +242,15 @@ public class GenBuildTask extends Ant {
                 getProject().setProperty("TARGET", targetList[i]);\r
                 String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
                 for(int j = 0; j < toolchainList.length; j ++){\r
+                    //\r
+                    // check if any tool is defined for current target + toolchain + arch\r
+                    // don't do anything if no tools found\r
+                    // \r
+                    if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {\r
+                        System.out.println("!!!Warning: No build issued. No tools found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");\r
+                        continue;\r
+                    }\r
+\r
                     //\r
                     // Prepare for toolchain related common properties\r
                     // TOOLCHAIN\r
index f3f0a048d92332936ba114166bc81c0e6a297f8c..75c637ffe1dea8f74edf1fb1dddf33c16e358674 100644 (file)
@@ -689,6 +689,18 @@ public class GlobalData {
         moduleToolChainFamilyOption.put(fpdModuleId, toolChainOption);\r
     }\r
 \r
+    public static boolean isCommandSet(String target, String toolchain, String arch) {\r
+        String[] commands = getToolChainInfo().getCommands();\r
+\r
+        for (int i = 0; i < commands.length; ++i) {\r
+            if (toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolChainAttribute.NAME.toString()}) != null) {\r
+                return true;\r
+            }\r
+        }\r
+\r
+        return false;\r
+    }\r
+\r
     public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {\r
         ToolChainKey toolChainKey = new ToolChainKey(commandDescription);\r
         ToolChainMap toolChainConfig = toolsDef.getConfig(); \r
index 39034fd4b72a88d6fe0b141059f20258eeba7c4d..51cbf852adee6a6e79265ff887d69fded69529f9 100644 (file)
@@ -31,39 +31,38 @@ public class ToolChainMap {
     private Map<ToolChainKey, String> map = null;\r
 \r
     public ToolChainMap() {\r
-        //this.map = new TreeMap<ToolChainKey, String>();\r
         this.map = new HashMap<ToolChainKey, String>();\r
     }\r
 \r
-    public String put(String key, String delimiter, String value)throws EdkException {\r
+    public String put(String key, String delimiter, String value) {\r
         ToolChainKey toolChainKey;\r
 \r
         try {\r
             toolChainKey = new ToolChainKey(key, delimiter);\r
         } catch (Exception e) {\r
-            throw new EdkException(e.getMessage());\r
+            return null;\r
         }\r
         return (String)map.put(toolChainKey, value);\r
     }\r
 \r
-    public String put(String key, String value) throws EdkException {\r
+    public String put(String key, String value) {\r
         ToolChainKey toolChainKey;\r
 \r
         try {\r
             toolChainKey = new ToolChainKey(key);\r
         } catch (Exception e) {\r
-            throw new EdkException(e.getMessage());\r
+            return null;\r
         }\r
         return (String)map.put(toolChainKey, value);\r
     }\r
 \r
-    public String put(String[] key, String value) throws EdkException {\r
+    public String put(String[] key, String value) {\r
         ToolChainKey toolChainKey;\r
 \r
         try {\r
             toolChainKey = new ToolChainKey(key);\r
         } catch (Exception e) {\r
-            throw new EdkException(e.getMessage());\r
+            return null;\r
         }\r
         return (String)map.put(toolChainKey, value);\r
     }\r
@@ -72,40 +71,40 @@ public class ToolChainMap {
         return (String)map.put(key, value);\r
     }\r
 \r
-    public String get(String key) throws EdkException {\r
+    public String get(String key) {\r
         ToolChainKey toolChainKey;\r
 \r
         try {\r
             toolChainKey = new ToolChainKey(key);\r
         } catch (Exception e) {\r
-            throw new EdkException(e.getMessage());\r
+            return null;\r
         }\r
         return get(toolChainKey);\r
     }\r
 \r
-    public String get(String key, String delimiter) throws EdkException {\r
+    public String get(String key, String delimiter) {\r
         ToolChainKey toolChainKey;\r
 \r
         try {\r
             toolChainKey = new ToolChainKey(key, delimiter);\r
         } catch (Exception e) {\r
-            throw new EdkException(e.getMessage());\r
+            return null;\r
         }\r
         return get(toolChainKey);\r
     }\r
 \r
-    public String get(String[] key)  throws EdkException {\r
+    public String get(String[] key) {\r
         ToolChainKey toolChainKey;\r
 \r
         try {\r
             toolChainKey = new ToolChainKey(key);\r
         } catch (Exception e) {\r
-            throw new EdkException(e.getMessage());\r
+            return null;\r
         }\r
         return get(toolChainKey);\r
     }\r
 \r
-    public String get(ToolChainKey key)  throws EdkException {\r
+    public String get(ToolChainKey key) {\r
         String result = map.get(key);\r
         if (result != null || map.containsKey(key)) {\r
             return result;\r
@@ -116,7 +115,7 @@ public class ToolChainMap {
         try {\r
             tmpKey = new ToolChainKey(keySet);\r
         } catch (Exception e) {\r
-            throw new EdkException(e.getMessage());\r
+            return null;\r
         }\r
 \r
         int level = matchLevel;\r
@@ -134,7 +133,7 @@ public class ToolChainMap {
                         continue;\r
                     }\r
                 } catch (Exception e) {\r
-                    throw new EdkException(e.getMessage());\r
+                    return null;\r
                 }\r
 \r
                 result = map.get(tmpKey);\r
@@ -157,9 +156,5 @@ public class ToolChainMap {
     public Set<ToolChainKey> keySet() {\r
         return (Set<ToolChainKey>)map.keySet();\r
     }\r
-    \r
-//    public String toString() {\r
-//        return map.toString();\r
-//    }\r
 }\r
 \r