X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FMakefile;h=d78b12d5050d166489b1957987de529825c3741b;hp=28be6717fef6942d33e48179e8fb5b88029789f0;hb=92beb1e4c73a40a708c7c0cade5c7cee314b3887;hpb=cd1c96046968581cc87d306ca8b06cc97784554b diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile index 28be6717fe..d78b12d505 100644 --- a/BaseTools/Source/Python/Makefile +++ b/BaseTools/Source/Python/Makefile @@ -1,7 +1,7 @@ ## @file # Windows makefile for Python tools build. # -# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, 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 @@ -11,16 +11,17 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -!IFNDEF PYTHON_FREEZER_PATH -!ERROR PYTHON_FREEZER_PATH must be defined! +!IFNDEF PYTHON_HOME +!ERROR PYTHON_HOME must be defined! !ENDIF +!IFDEF PYTHON_FREEZER_PATH !IF EXIST ($(PYTHON_FREEZER_PATH)\cxfreeze) # Using cx_Freeze 4.2.3 with Python 2.7.2 FREEZE=$(PYTHON_HOME)\python $(PYTHON_FREEZER_PATH)\cxfreeze !ELSE -# Using cx_Freeze 3.0.3 with Python 2.5.4 -FREEZE=$(PYTHON_FREEZER_PATH)\FreezePython.exe +!ERROR PYTHON_FREEZER_PATH does not exist! +!ENDIF !ENDIF MODULES=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8,encodings.utf_16_le,encodings.latin_1,encodings.ascii @@ -36,25 +37,16 @@ APPLICATIONS=$(BIN_DIR)\build.exe $(BIN_DIR)\GenFds.exe $(BIN_DIR)\Trim.exe $(BI COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\Database.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\DataType.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\DecClassObject.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\Dictionary.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\DscClassObject.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\EdkIIWorkspace.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\EdkIIWorkspaceBuild.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\EdkLogger.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\Expression.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\FdfClassObject.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\FdfParserLite.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\GlobalData.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\Identification.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\InfClassObject.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\LongFilePathOs.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\LongFilePathOsPath.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\LongFilePathSupport.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\MigrationUtilities.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\Misc.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\Parsing.py \ - $(BASE_TOOLS_PATH)\Source\Python\Common\String.py \ + $(BASE_TOOLS_PATH)\Source\Python\Common\StringUtils.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\TargetTxtClassObject.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\ToolDefClassObject.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\VpdInfoFile.py \ @@ -64,9 +56,6 @@ COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \ $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\DataClass.py \ $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\Exceptions.py \ $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\FdfClass.py \ - $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\ModuleClass.py \ - $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\PackageClass.py \ - $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\PlatformClass.py \ $(BASE_TOOLS_PATH)\Source\Python\Table\Table.py \ $(BASE_TOOLS_PATH)\Source\Python\Table\TableDataModel.py \ $(BASE_TOOLS_PATH)\Source\Python\Table\TableDec.py \ @@ -87,6 +76,9 @@ COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \ $(BASE_TOOLS_PATH)\Source\Python\Workspace\MetaFileTable.py \ $(BASE_TOOLS_PATH)\Source\Python\Workspace\WorkspaceCommon.py \ $(BASE_TOOLS_PATH)\Source\Python\Workspace\WorkspaceDatabase.py \ + $(BASE_TOOLS_PATH)\Source\Python\Workspace\DecBuildData.py \ + $(BASE_TOOLS_PATH)\Source\Python\Workspace\DscBuildData.py \ + $(BASE_TOOLS_PATH)\Source\Python\Workspace\InfBuildData.py \ $(BASE_TOOLS_PATH)\Source\Python\AutoGen\AutoGen.py \ $(BASE_TOOLS_PATH)\Source\Python\AutoGen\BuildEngine.py \ $(BASE_TOOLS_PATH)\Source\Python\AutoGen\GenC.py \ @@ -97,6 +89,7 @@ COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \ $(BASE_TOOLS_PATH)\Source\Python\AutoGen\StrGather.py \ $(BASE_TOOLS_PATH)\Source\Python\AutoGen\UniClassObject.py \ $(BASE_TOOLS_PATH)\Source\Python\AutoGen\ValidCheckingInfoObject.py \ + $(BASE_TOOLS_PATH)\Source\Python\AutoGen\GenVar.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\RangeExpression.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\VariableAttributes.py @@ -114,7 +107,6 @@ CMD_BUILD=$(BASE_TOOLS_PATH)\Source\Python\build\BuildReport.py \ $(BASE_TOOLS_PATH)\Source\Python\Eot\EotGlobalData.py \ $(BASE_TOOLS_PATH)\Source\Python\Eot\EotToolError.py \ $(BASE_TOOLS_PATH)\Source\Python\Eot\FileProfile.py \ - $(BASE_TOOLS_PATH)\Source\Python\Eot\FvImage.py \ $(BASE_TOOLS_PATH)\Source\Python\Eot\InfParserLite.py \ $(BASE_TOOLS_PATH)\Source\Python\Eot\LzmaCompressor.pyd \ $(BASE_TOOLS_PATH)\Source\Python\Eot\Parser.py \ @@ -175,7 +167,7 @@ CMD_UPT=$(BASE_TOOLS_PATH)\Source\Python\UPT\Core\DependencyRules.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Library\Misc.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Library\ParserValidate.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Library\Parsing.py \ - $(BASE_TOOLS_PATH)\Source\Python\UPT\Library\String.py \ + $(BASE_TOOLS_PATH)\Source\Python\UPT\Library\StringUtils.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Library\UniClassObject.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Library\Xml\XmlRoutines.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Logger\Log.py \ @@ -236,7 +228,34 @@ CMD_UPT=$(BASE_TOOLS_PATH)\Source\Python\UPT\Core\DependencyRules.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParser.py \ $(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParserMisc.py +CMD_ECC=$(BASE_TOOLS_PATH)\Source\Python\Ecc\c.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\Check.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\CLexer.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragment.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragmentCollector.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\Configuration.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\CParser.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\Database.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\Ecc.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccGlobalData.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccToolError.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\Exception.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\FileProfile.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaDataParser.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\ParserWarning.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaDataTable.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFileParser.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFileTable.py \ + $(BASE_TOOLS_PATH)\Source\Python\Ecc\Xml\XmlRoutines.py + +!IFDEF PYTHON_FREEZER_PATH all: SetPythonPath $(APPLICATIONS) +!ELSE +all: + @echo. + @echo !!! WARNING !!! PYTHON_FREEZER_PATH is not set. + @echo Cannot make executable from Python code, executing python scripts instead !!! +!ENDIF SetPythonPath: set PYTHONPATH=$(BASE_TOOLS_PATH)\Source\Python @@ -310,5 +329,6 @@ $(BIN_DIR)\TestRoot.pub.pem: $(BASE_TOOLS_PATH)\Source\Python\Pkcs7Sign\TestRoot clean: cleanall: @del /f /q $(BIN_DIR)\*.pyd $(BIN_DIR)\*.dll + @del /f /q $(BASE_TOOLS_PATH)\Source\Python\*.pyc @for %%i in ($(APPLICATIONS)) do @del /f /q %%i