##\r
# Import Modules\r
#\r
+from __future__ import print_function\r
import Common.LongFilePathOs as os\r
import re\r
import copy\r
return hash(self.Target.Path)\r
\r
def __eq__(self, Other):\r
- if type(Other) == type(self):\r
+ if isinstance(Other, type(self)):\r
return Other.Target.Path == self.Target.Path\r
else:\r
return str(Other) == self.Target.Path\r
# Clean up the line and replace path separator with native one\r
Line = self.RuleContent[Index].strip().replace(self._PATH_SEP, os.path.sep)\r
self.RuleContent[Index] = Line\r
- \r
+\r
# find the build_rule_version\r
- if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) <> -1:\r
- if Line.find("=") <> -1 and Line.find("=") < (len(Line) - 1) and (Line[(Line.find("=") + 1):]).split():\r
+ if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) != -1:\r
+ if Line.find("=") != -1 and Line.find("=") < (len(Line) - 1) and (Line[(Line.find("=") + 1):]).split():\r
self._FileVersion = (Line[(Line.find("=") + 1):]).split()[0]\r
# skip empty or comment line\r
if Line == "" or Line[0] == "#":\r
EdkLogger.Initialize()\r
if len(sys.argv) > 1:\r
Br = BuildRule(sys.argv[1])\r
- print str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "MSFT"][1])\r
- print\r
- print str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "INTEL"][1])\r
- print\r
- print str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "GCC"][1])\r
- print\r
- print str(Br[".ac", "ACPI_TABLE", "IA32", "MSFT"][1])\r
- print\r
- print str(Br[".h", "ACPI_TABLE", "IA32", "INTEL"][1])\r
- print\r
- print str(Br[".ac", "ACPI_TABLE", "IA32", "MSFT"][1])\r
- print\r
- print str(Br[".s", SUP_MODULE_SEC, "IPF", "COMMON"][1])\r
- print\r
- print str(Br[".s", SUP_MODULE_SEC][1])\r
+ print(str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "MSFT"][1]))\r
+ print()\r
+ print(str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "INTEL"][1]))\r
+ print()\r
+ print(str(Br[".c", SUP_MODULE_DXE_DRIVER, "IA32", "GCC"][1]))\r
+ print()\r
+ print(str(Br[".ac", "ACPI_TABLE", "IA32", "MSFT"][1]))\r
+ print()\r
+ print(str(Br[".h", "ACPI_TABLE", "IA32", "INTEL"][1]))\r
+ print()\r
+ print(str(Br[".ac", "ACPI_TABLE", "IA32", "MSFT"][1]))\r
+ print()\r
+ print(str(Br[".s", SUP_MODULE_SEC, "IPF", "COMMON"][1]))\r
+ print()\r
+ print(str(Br[".s", SUP_MODULE_SEC][1]))\r
\r