diff options
Diffstat (limited to 'BaseTools/Source/Python/build/build.py')
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index c92b442..7d14e15 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -158,13 +158,6 @@ def CheckEnvVariable(): EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found", ExtraData="PATH") - # for macro replacement in R9 DSC/DEC/INF file - GlobalData.gGlobalDefines["WORKSPACE"] = "" - - # for macro replacement in R8 INF file - GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir - GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir - GlobalData.gWorkspace = WorkspaceDir GlobalData.gEfiSource = EfiSourceDir GlobalData.gEdkSource = EdkSourceDir @@ -705,8 +698,8 @@ class Build(): self.TargetTxt = TargetTxtClassObject() self.ToolDef = ToolDefClassObject() - #self.Db = WorkspaceDatabase(None, GlobalData.gGlobalDefines, self.Reparse) - self.Db = WorkspaceDatabase(None, {}, self.Reparse) + self.Db = WorkspaceDatabase(None, GlobalData.gGlobalDefines, self.Reparse) + #self.Db = WorkspaceDatabase(None, {}, self.Reparse) self.BuildDatabase = self.Db.BuildObject self.Platform = None @@ -1258,6 +1251,7 @@ def MyOptionParser(): "including library instances selected, final dependency expression, "\ "and warning messages, etc.") Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.") + Parser.add_option("-D", "--define", action="append", type="string", dest="Macros", help="Macro: \"Name [= Value]\".") (Opt, Args)=Parser.parse_args() return (Opt, Args) @@ -1321,7 +1315,7 @@ def Main(): EdkLogger.error("build", OPTION_NOT_SUPPORTED, "Not supported target [%s]." % Target, ExtraData="Please select one of: %s" %(' '.join(gSupportedTarget))) - # GlobalData.gGlobalDefines = ParseDefines(Option.Defines) + GlobalData.gGlobalDefines = ParseDefines(Option.Macros) # # Check environment variable: EDK_TOOLS_PATH, WORKSPACE, PATH # |