From: Michael D Kinney Date: Wed, 2 Aug 2017 21:16:49 +0000 (-0700) Subject: BaseTools/Scripts: Add python script to run a makefile X-Git-Tag: edk2-stable201903~3657 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=c8d385265fa38e0933768fccc8dc0bf5b8725037;hp=c8d385265fa38e0933768fccc8dc0bf5b8725037 BaseTools/Scripts: Add python script to run a makefile https://bugzilla.tianocore.org/show_bug.cgi?id=670 Add the python script RunMakefile.py that can be used in a PREBUILD/POSTBUIILD action to invoke a makefile passing in context as makefile defines. The command line arguments passed into RunMakefile.py are converted to the following set of defines. * ACTIVE_PLATFORM * TARGET_ARCH * TOOL_CHAIN_TAG * CONF_DIRECTORY * TARGET * EXTRA_FLAGS In addition, a makefile can access the system environment variables including WORKSPACE and PACKAGES_PATH. The makefile target from the following set is also passed into the makefile. If no target is passed into build, then the 'all' target is used. [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run] A platform DSC file can use a statements in the [Defines] section of the following form to use this script. MAKEFILE is a WORKSPACE or PACKAGES_PATH relative path to the makefile to run. [Defines] PREBUILD = python BaseTools/Script/RunMakefile.py --makefile MAKEFILE POSTBUILD = python BaseTools/Script/RunMakefile.py --makefile MAKEFILE Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney Reviewed-by: Yonghong Zhu ---