summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java133
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java4
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/ToolChainId.java305
3 files changed, 412 insertions, 30 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java
index 2881045..64201b5 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java
@@ -23,6 +23,7 @@ import javax.swing.ListSelectionModel;
import org.tianocore.PlatformSurfaceAreaDocument;
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
+import org.tianocore.frameworkwizard.toolchain.ToolChainId;
import javax.swing.JCheckBox;
import javax.swing.JOptionPane;
@@ -44,31 +45,33 @@ import java.util.Vector;
public class FpdPlatformDefs extends IInternalFrame {
+ private static boolean Debug = false;
+
private final int dialogWidth = 600;
private final int oneRowHeight = 20;
private final int twoRowHeight = 40;
-// private final int threeRowHeight = 60;
+ // private final int threeRowHeight = 60;
private final int fourRowHeight = 80;
private final int sepHeight = 6;
-// private final int sepWidth = 10;
+ // private final int sepWidth = 10;
private final int buttonWidth = 90;
private final int rowOne = 12;
- private final int rowTwo = rowOne + oneRowHeight + sepHeight;
+ private final int rowTwo = rowOne + oneRowHeight + sepHeight * 3;
private final int rowThree = rowTwo + oneRowHeight + sepHeight;
private final int rowFour = rowThree + oneRowHeight + sepHeight;
- private final int rowFive = rowFour + fourRowHeight + sepHeight;
+ private final int rowFive = rowFour + fourRowHeight + sepHeight * 3;
private final int rowSix = rowFive + oneRowHeight + sepHeight;
@@ -78,7 +81,7 @@ public class FpdPlatformDefs extends IInternalFrame {
private final int rowNine = rowEight + oneRowHeight + sepHeight;
- private final int rowTen = rowNine + fourRowHeight + sepHeight + sepHeight;
+ private final int rowTen = rowNine + fourRowHeight + sepHeight + sepHeight * 3;
private final int rowEleven = rowTen + oneRowHeight + sepHeight;
@@ -100,11 +103,6 @@ public class FpdPlatformDefs extends IInternalFrame {
private final int tableWidth = valueWidth;
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
static JFrame frame;
private JPanel jContentPane = null;
@@ -133,13 +131,15 @@ public class FpdPlatformDefs extends IInternalFrame {
private JComboBox jComboBoxInterDir = null;
+ private JComboBox jBuildTargetComboBox = null;
+
private JTable jTableBuildTargets = null;
private JPanel jArchitectureSelections = null;
private JLabel jLabelBuildTargets = null;
- private JTextField jTextFieldBuildTarget = null;
+ // private JTextField jTextFieldBuildTarget = null;
private JButton jButtonAddBuildTarget = null;
@@ -181,6 +181,13 @@ public class FpdPlatformDefs extends IInternalFrame {
private int selectedRow = -1;
+ /**
+ * The following are not used by the UI
+ */
+ private static final long serialVersionUID = 1L;
+
+ private ToolChainId tid = new ToolChainId();
+
public FpdPlatformDefs() {
super();
initialize();
@@ -399,7 +406,9 @@ public class FpdPlatformDefs extends IInternalFrame {
jPanelGeneralContainer.add(getArchitectureSelections(), null);
jPanelGeneralContainer.add(jLabelBuildTargets, null);
- jPanelGeneralContainer.add(getJTextFieldBuildTarget(), null);
+ // jPanelGeneralContainer.add(getJTextFieldBuildTarget(), null);
+ jPanelGeneralContainer.add(getJBuildTargetComboBox(), null);
+
jPanelGeneralContainer.add(getJButtonAddBuildTarget(), null);
jPanelGeneralContainer.add(getJButtonDelBuildTarget(), null);
jPanelGeneralContainer.add(getJScrollPaneBuildTargets(), null);
@@ -441,6 +450,8 @@ public class FpdPlatformDefs extends IInternalFrame {
jArchitectureSelections.setBounds(new java.awt.Rectangle(valueColumn, rowOne, valueWidth, oneRowHeight));
jArchitectureSelections.setPreferredSize(new java.awt.Dimension(valueWidth, oneRowHeight));
jArchitectureSelections.setLocation(new java.awt.Point(valueColumn, rowOne));
+ jArchitectureSelections.setToolTipText("<html>A Platform may support one or more architectures,"
+ + "<br>at least one architecture must be selected!</html>");
}
return jArchitectureSelections;
}
@@ -602,21 +613,59 @@ public class FpdPlatformDefs extends IInternalFrame {
}
/**
- * This method initializes jTextField1
- *
- * @return javax.swing.JTextField
+ * Use a ComboBox for BuildTargets
+ *
+ * @return javax.swing.JComboBox jBuildTargetComboBox
*/
- private JTextField getJTextFieldBuildTarget() {
- if (jTextFieldBuildTarget == null) {
- jTextFieldBuildTarget = new JTextField();
- jTextFieldBuildTarget.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
- jTextFieldBuildTarget.setBounds(new java.awt.Rectangle(valueColumn, rowTwo, valueWidth, oneRowHeight));
- jTextFieldBuildTarget.setLocation(new java.awt.Point(valueColumn, rowTwo));
+ private JComboBox getJBuildTargetComboBox() {
+ if (jBuildTargetComboBox == null) {
+ String toolBt = null;
+ if (tid.getToolsDefTargetNames() == null)
+ toolBt = "DEBUG RELEASE";
+ else
+ toolBt = tid.getToolsDefTargetNames().trim();
+
+ if ((toolBt.contains("*")) || (toolBt.length() < 1)) {
+ toolBt = "DEBUG RELEASE";
+ }
+ if (Debug)
+ System.out.println("Using Build Targets: " + toolBt.trim());
+
+ toolBt = toolBt.replaceAll(" ", ":");
+ toolBt = " :" + toolBt;
+ if (Debug)
+ System.out.println("Using Build Targets: " + toolBt.trim());
+ String[] buildTargets = toolBt.trim().split(":");
+
+ jBuildTargetComboBox = new JComboBox(buildTargets);
+ jBuildTargetComboBox.setEditable(true);
+ jBuildTargetComboBox.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
+ jBuildTargetComboBox.setBounds(new java.awt.Rectangle(valueColumn, rowTwo, valueWidth, oneRowHeight));
+ jBuildTargetComboBox.setLocation(new java.awt.Point(valueColumn, rowTwo));
+ jBuildTargetComboBox.setToolTipText("<html>Select a defined Target and then click Add,<br>"
+ + "or enter a new, one word TargetName and then click Add.<br>"
+ + "Remember to define the Targetname in the tool defintion file."
+ + "</html>");
+
}
- return jTextFieldBuildTarget;
+ return jBuildTargetComboBox;
}
/**
+ * This method initializes jTextField1
+ *
+ * @return javax.swing.JTextField
+ */
+ // private JTextField getJTextFieldBuildTarget() {
+ // if (jTextFieldBuildTarget == null) {
+ // jTextFieldBuildTarget = new JTextField();
+ // jTextFieldBuildTarget.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
+ // jTextFieldBuildTarget.setBounds(new java.awt.Rectangle(valueColumn, rowTwo, valueWidth, oneRowHeight));
+ // jTextFieldBuildTarget.setLocation(new java.awt.Point(valueColumn, rowTwo));
+ // }
+ // return jTextFieldBuildTarget;
+ // }
+ /**
* This method initializes jButton2
*
* @return javax.swing.JButton
@@ -633,16 +682,26 @@ public class FpdPlatformDefs extends IInternalFrame {
jButtonAddBuildTarget.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
- if (jTextFieldBuildTarget.getText().length() > 0) {
- String[] row = { jTextFieldBuildTarget.getText() };
- jTextFieldBuildTarget.setText("");
+ // Used with Text Field
+ // if (jTextFieldBuildTarget.getText().length() > 0) {
+ // String[] row = { jTextFieldBuildTarget.getText() };
+ // jTextFieldBuildTarget.setText("");
+ // buildTargetTableModel.addRow(row);
+ // Vector<Object> v = new Vector<Object>();
+ // for (int i = 0; i < jTableBuildTargets.getRowCount(); ++i) {
+ // v.add(buildTargetTableModel.getValueAt(i, 0));
+ // }
+ // docConsole.setSaved(false);
+ // ffc.setPlatformDefsBuildTargets(v);
+ // }
+ // Use with ComboBox
+ if (jBuildTargetComboBox.getSelectedItem().toString().length() > 0) {
+ String[] row = { jBuildTargetComboBox.getSelectedItem().toString() };
buildTargetTableModel.addRow(row);
Vector<Object> v = new Vector<Object>();
for (int i = 0; i < jTableBuildTargets.getRowCount(); ++i) {
v.add(buildTargetTableModel.getValueAt(i, 0));
}
- docConsole.setSaved(false);
- ffc.setPlatformDefsBuildTargets(v);
}
}
});
@@ -716,6 +775,8 @@ public class FpdPlatformDefs extends IInternalFrame {
jTableBuildTargets = new JTable(buildTargetTableModel);
jTableBuildTargets.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jTableBuildTargets.setRowHeight(oneRowHeight);
+ jTableBuildTargets.setToolTipText("<html>Select one of the Targets from the table and<br>"
+ + "click Delete to remove the target from the platform.</html>");
buildTargetTableModel.addColumn("Build Target");
jTableBuildTargets.getModel().addTableModelListener(new TableModelListener() {
@@ -753,6 +814,7 @@ public class FpdPlatformDefs extends IInternalFrame {
jTextFieldSkuId.setPreferredSize(new Dimension(40, oneRowHeight));
jTextFieldSkuId.setBounds(new java.awt.Rectangle(valueColumn, rowSix, 40, oneRowHeight));
jTextFieldSkuId.setLocation(new java.awt.Point(valueColumn, rowSix));
+ jTextFieldSkuId.setToolTipText("Enter a unique integer value.");
}
return jTextFieldSkuId;
}
@@ -768,6 +830,9 @@ public class FpdPlatformDefs extends IInternalFrame {
jTextFieldSkuName.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
jTextFieldSkuName.setBounds(new java.awt.Rectangle(valueColumn, rowSeven, valueWidth, oneRowHeight));
jTextFieldSkuName.setLocation(new java.awt.Point(valueColumn, rowSeven));
+ jTextFieldSkuName.setToolTipText("<html>Enter a name to help identify this SKU.<br>"
+ + "This entry is not used by the build system, it is<br>"
+ + "used only by this user interface.</html>");
}
return jTextFieldSkuName;
}
@@ -843,7 +908,10 @@ public class FpdPlatformDefs extends IInternalFrame {
jScrollPaneSkuInfo.setPreferredSize(new Dimension(tableWidth - 20, tableHeight - 20));
jScrollPaneSkuInfo.setBounds(new java.awt.Rectangle(valueColumn, rowNine, tableWidth - 5, tableHeight - 5));
jScrollPaneSkuInfo.setLocation(new java.awt.Point(valueColumn, rowNine));
- jScrollPaneSkuInfo.setBorder(null);
+
+ jScrollPaneSkuInfo
+ .setBorder(javax.swing.BorderFactory
+ .createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
jScrollPaneSkuInfo.setViewportView(getJTableSkuInfo());
}
@@ -861,6 +929,10 @@ public class FpdPlatformDefs extends IInternalFrame {
skuInfoTableModel.addColumn("SKU ID");
skuInfoTableModel.addColumn("Name");
jTableSkuInfo = new JTable(skuInfoTableModel);
+ jTableSkuInfo.setToolTipText("<html>SKU ID 0 must always be defined as the default.<br>"
+ + "0 can mean either SKU disabled, or it can be the<br>"
+ + "default value if more than one SKU is defined, and the<br>"
+ + "platform is not jumpered to use one of the other SKU values.</html>");
jTableSkuInfo.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
@@ -896,6 +968,10 @@ public class FpdPlatformDefs extends IInternalFrame {
jComboBoxInterDir.addItem("UNIFIED");
jComboBoxInterDir.addItem("MODULE");
jComboBoxInterDir.setSelectedIndex(0);
+ jComboBoxInterDir.setToolTipText("<html>Select UNIFIED to generate intermediate directories under<br>"
+ + "under platform directory tree.<br>"
+ + "Select MODULE to generate intermediate directories under the<br>"
+ + "individual module directories.</html>");
jComboBoxInterDir.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
if (docConsole != null) {
@@ -920,6 +996,7 @@ public class FpdPlatformDefs extends IInternalFrame {
jTextFieldOutputDir.setBounds(new java.awt.Rectangle(valueColumn + 30, rowTwelve, valueWidth - 30,
oneRowHeight));
jTextFieldOutputDir.setLocation(new java.awt.Point(valueColumn + 30, rowTwelve));
+ jTextFieldOutputDir.setToolTipText("Select the name or URL for the output directory tree.");
jTextFieldOutputDir.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent e) {
docConsole.setSaved(false);
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java
index d7edcf9..0c417c5 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java
@@ -42,6 +42,7 @@ import org.tianocore.frameworkwizard.workspace.Workspace;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
import org.tianocore.frameworkwizard.platform.PlatformIdentification;
import org.tianocore.PlatformSurfaceAreaDocument;
+import org.tianocore.frameworkwizard.toolchain.ToolChainId;
/**
* The class is used to update the target.txt file.
@@ -224,7 +225,7 @@ public class Preferences extends IFrame {
private Vector<String> vArchList = null;
private Vector<String> vDisableArchList = null;
-
+
//
// Not used by UI
//
@@ -574,7 +575,6 @@ public class Preferences extends IFrame {
* Read Current target.txt file first
* Read TOOL_CHAIN_CONF file if specified, otherwise use tools_def.txt
*/
-
readTargetTxtFile();
boolean haveBuildTargets = readToolDefinitionFile();
if (!haveBuildTargets) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/ToolChainId.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/ToolChainId.java
new file mode 100644
index 0000000..992bd2f
--- /dev/null
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/ToolChainId.java
@@ -0,0 +1,305 @@
+/** @file
+
+ This file is used to init tool chain and tool preference data
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ **/
+
+package org.tianocore.frameworkwizard.toolchain;
+
+import java.io.*;
+import java.io.File;
+import java.lang.Integer;
+import java.util.ArrayList;
+
+import javax.swing.JOptionPane;
+
+import org.tianocore.frameworkwizard.common.DataType;
+import org.tianocore.frameworkwizard.common.Tools;
+import org.tianocore.frameworkwizard.common.Log;
+import org.tianocore.frameworkwizard.workspace.Workspace;
+
+public class ToolChainId {
+ //
+ // Define class members
+ //
+
+ private final boolean Debug = false;
+
+ private String toolDefinitionFile = null;
+
+ private final int toolDefFieldCount = 5;
+
+ private String toolsDefIdentifier = null;
+
+ private String toolsDefTargetNames = null;
+
+ private final int toolsDefTargetNameField = 0;
+
+ private String toolsDefTagNames = null;
+
+ private final int toolsDefTagNameField = 1;
+
+ private String toolsDefArchNames = null;
+
+ private final int toolsDefArchNameField = 2;
+
+ private final int toolsDefToolArgumentField = 4;
+
+ private String toolCommandCodes = null;
+
+ private final int toolsDefCmdCodeArgumentField = 3;
+
+
+ private String activePlatform = null;
+
+ private String targetArchs = null;
+
+ private String tagNames = null;
+
+ private String buildTargets = null;
+
+ private String toolFamilies = null;
+
+ private ArrayList<String> toolDefinitionContents = new ArrayList<String>(50);
+
+ private static boolean threadEnabled = false;
+
+ private static int maxThreadCount = 0;
+
+ private String toolsDir = Workspace.getCurrentWorkspace() + System.getProperty("file.separator") + "Tools"
+ + System.getProperty("file.separator") + "Conf";
+
+ private String strTargetFile = toolsDir + DataType.FILE_SEPARATOR + "target.txt";
+
+ private String defaultToolsConf = toolsDir + DataType.FILE_SEPARATOR + "tools_def.txt";
+
+ public void init() {
+ readTargetTxtFile();
+ readToolDefinitionFile();
+ }
+
+ public ToolChainId() {
+ super();
+ init();
+ }
+
+ public String getToolDefinitionFile() {
+ return toolDefinitionFile;
+ }
+
+ public String getActivePlatform() {
+ return activePlatform;
+ }
+
+ public String getBuildTargets() {
+ return buildTargets;
+ }
+
+ public String getTagNames() {
+ return tagNames;
+ }
+
+ public String getTargetArchitectures() {
+ return targetArchs;
+ }
+
+ public boolean getThreadEnabled() {
+ return threadEnabled;
+ }
+
+ public int getMaxThreadCount() {
+ return maxThreadCount;
+ }
+
+ public String getToolFamilies() {
+ return toolFamilies;
+ }
+
+ public String getToolDefinitionIdentifier() {
+ return toolsDefIdentifier;
+ }
+
+ public ArrayList<String> getToolDefinitionStatements() {
+ return toolDefinitionContents;
+ }
+
+ public String getToolsDefTagNames() {
+ return toolsDefTagNames;
+ }
+
+ public String getToolsDefTargetNames() {
+ return toolsDefTargetNames;
+ }
+
+ public String getToolsDefCommandCodes() {
+ return toolCommandCodes;
+ }
+
+ private void readTargetTxtFile() {
+ File tFile = new File(strTargetFile);
+
+ if (tFile.exists()) {
+ try {
+ FileReader fileReader = new FileReader(strTargetFile);
+ BufferedReader reader = new BufferedReader(fileReader);
+ String rLine = null;
+ String inLine[] = new String[2];
+ while ((rLine = reader.readLine()) != null) {
+ if ((rLine.startsWith("ACTIVE_PLATFORM")) && (activePlatform == null)) {
+ // Only one active platform is permitted!
+ inLine = rLine.trim().split("=");
+ activePlatform = inLine[1].trim();
+ }
+ if ((rLine.startsWith("TARGET" + " ")) || (rLine.startsWith("TARGET" + "\t"))
+ || (rLine.startsWith("TARGET="))) {
+ // Handle multiple Target Names
+ if (rLine.contains(",")) {
+ inLine = rLine.trim().split("=");
+ buildTargets = inLine[1].trim().replaceAll(",", " ");
+ } else {
+ inLine = rLine.trim().split("=");
+ buildTargets = inLine[1].trim();
+ }
+ }
+ if (rLine.startsWith("TARGET_ARCH")) {
+ // Handle multiple Target Architectures
+ if (rLine.contains(",")) {
+ inLine = rLine.trim().split("=");
+ targetArchs = inLine[1].trim().replaceAll(",", " ");
+ } else {
+ inLine = rLine.trim().split("=");
+ targetArchs = inLine[1].trim();
+ }
+ }
+ if (rLine.startsWith("TOOL_CHAIN_CONF")) {
+ // Only one file is permitted
+ inLine = rLine.trim().split("=");
+ toolDefinitionFile = inLine[1].trim();
+ }
+
+ if (rLine.startsWith("TOOL_CHAIN_TAG")) {
+ // Handle multiple Tool TagNames
+ if (rLine.contains(",")) {
+ inLine = rLine.trim().split("=");
+ tagNames = inLine[1].trim().replaceAll(",", " ");
+ } else {
+ inLine = rLine.trim().split("=");
+ tagNames = inLine[1].trim();
+ }
+ }
+
+ if (rLine.startsWith("MULTIPLE_THREAD")) {
+ // Handle Thread Enable flag
+ if ((rLine.trim().toLowerCase().contains("enabled"))
+ || (rLine.trim().toLowerCase().contains("true"))) {
+ threadEnabled = true;
+ } else {
+ threadEnabled = false;
+ }
+ }
+
+ if (rLine.startsWith("MAX_CONCURRENT_THREAD_NUMBER")) {
+ // Handle Thread Enable flag
+ inLine = rLine.trim().split("=");
+ maxThreadCount = Integer.valueOf(inLine[1].trim());
+ }
+ }
+ reader.close();
+ } catch (IOException e) {
+ Log.log(this.strTargetFile + " Read Error ", e.getMessage());
+ e.printStackTrace();
+ }
+ } else {
+ JOptionPane.showMessageDialog(null, "<html>" + "Tool Preferences file: <br>" + strTargetFile
+ + "<br>does not exist!</html>");
+ }
+ }
+
+ private void readToolDefinitionFile() {
+
+ // Parse the tool definition file looking for targets and architectures
+ String toolsConfFile = null;
+ if (toolDefinitionFile != null) {
+ String resString = (Tools.convertPathToCurrentOsType(toolDefinitionFile)).trim();
+ toolsConfFile = Workspace.getCurrentWorkspace() + System.getProperty("file.separator") + resString.trim();
+ File toolsDefFile = new File(toolsConfFile);
+ if (!toolsDefFile.exists()) {
+ JOptionPane.showMessageDialog(null, "<html>" + "Tool Definition file, " + toolDefinitionFile
+ + "<br>specified in the target.txt file does not exist!"
+ + "<br>Using the default Tool Definition File:<br>"
+ + defaultToolsConf);
+ toolsConfFile = defaultToolsConf;
+ }
+ } else {
+ toolsConfFile = defaultToolsConf;
+ }
+ String[] toolsDefFields = new String[toolDefFieldCount];
+ for (int i = 0; i < toolDefFieldCount; i++)
+ toolsDefFields[i] = null;
+ File toolDefFile = new File(toolsConfFile);
+ if (toolDefFile.exists()) {
+ try {
+ FileReader fileReader = new FileReader(toolDefFile);
+ BufferedReader reader = new BufferedReader(fileReader);
+ String rLine = null;
+ String result[];
+ while ((rLine = reader.readLine()) != null) {
+ if ((rLine.startsWith("IDENTIFIER")) && (toolsDefIdentifier == null)) {
+ result = rLine.split("=");
+ toolsDefIdentifier = (result[1]).trim();
+ } else if ((!rLine.startsWith("#")) && (rLine.contains("="))) {
+ result = rLine.split("=");
+ toolsDefFields = ((result[0]).trim()).split("_");
+ if (toolsDefTargetNames == null) {
+ toolsDefTargetNames = (toolsDefFields[toolsDefTargetNameField]).toUpperCase().trim() + " ";
+ } else if (!toolsDefTargetNames.contains((toolsDefFields[toolsDefTargetNameField]).toUpperCase().trim())) {
+ toolsDefTargetNames += (toolsDefFields[toolsDefTargetNameField]).toUpperCase().trim() + " ";
+ }
+ if (toolsDefTagNames == null) {
+ toolsDefTagNames = (toolsDefFields[toolsDefTagNameField]).toUpperCase().toUpperCase().trim() + " ";
+ } else if (!toolsDefTagNames.contains((toolsDefFields[toolsDefTagNameField]).toUpperCase().trim())) {
+ toolsDefTagNames += (toolsDefFields[toolsDefTagNameField]).toUpperCase().trim() + " ";
+ }
+ if (toolsDefArchNames == null) {
+ toolsDefArchNames = (toolsDefFields[toolsDefArchNameField]).toUpperCase().trim() + " ";
+ } else if (!toolsDefArchNames.contains((toolsDefFields[toolsDefArchNameField]).toUpperCase().trim())) {
+ toolsDefArchNames += (toolsDefFields[toolsDefArchNameField]).toUpperCase().trim() + " ";
+ }
+ if ((toolFamilies == null) && (rLine.trim().contains("FAMILY"))) {
+ toolFamilies = (toolsDefFields[toolsDefToolArgumentField]).toUpperCase().trim() + " ";
+ } else if ((rLine.trim().contains("FAMILY"))
+ && (!toolFamilies.contains((toolsDefFields[toolsDefToolArgumentField]).toUpperCase().trim()))) {
+ toolFamilies += (toolsDefFields[toolsDefToolArgumentField]).toUpperCase().trim() + " ";
+ }
+ if ((toolCommandCodes == null)) {
+ toolCommandCodes = (toolsDefFields[toolsDefCmdCodeArgumentField]).toUpperCase().trim() + " ";
+ } else if ((!toolCommandCodes.contains((toolsDefFields[toolsDefCmdCodeArgumentField]).toUpperCase().trim()))) {
+ toolCommandCodes += (toolsDefFields[toolsDefCmdCodeArgumentField].toUpperCase().trim()) + " ";
+ }
+
+ toolDefinitionContents.add(rLine.trim().replaceAll(" ", ""));
+ }
+ }
+ reader.close();
+ if (!toolsDefTargetNames.matches("[A-Z]+")) {
+ toolsDefTargetNames = toolsDefTargetNames.replace("* ", "").trim();
+ if (Debug)
+ System.out.println("tools_def file does not define build targets: '" + toolsDefTargetNames
+ + "'");
+ }
+ } catch (IOException e) {
+ Log.log(toolsConfFile + " Read Error ", e.getMessage());
+ e.printStackTrace();
+ }
+ }
+ }
+
+}