summaryrefslogtreecommitdiff
path: root/DuetPkg/GetVariables.bat
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-11-11 16:21:35 +0800
committerHao Wu <hao.a.wu@intel.com>2016-11-14 19:33:11 +0800
commitbab82372a9e6ce066fa725a792e71d07191046ca (patch)
tree8f7f709bb0b64ce8e972f37a901c2b49e0a1d3f5 /DuetPkg/GetVariables.bat
parentea4511d127f45e5028996aba6613b4807c3c7902 (diff)
downloadedk2-bab82372a9e6ce066fa725a792e71d07191046ca.zip
edk2-bab82372a9e6ce066fa725a792e71d07191046ca.tar.gz
edk2-bab82372a9e6ce066fa725a792e71d07191046ca.tar.bz2
DuetPkg: Add POSTBUILD in DSC files to run post-build automatically
https://bugzilla.tianocore.org/show_bug.cgi?id=220 Currently, the post-build scripts PostBuild.bat/PostBuild.sh in DuetPkg need to be run manually. Especially for Windows batch script, it also requires users to set the build options (like tool chain, target and arch) in file Conf/target.txt. If users using command line options via '-t' or '-a', the post-build script won't work properly. The package DSC files now support the feature to execute post-build script automatically by adding a 'POSTBUILD' definition. This feature also passes the build options into the post-build script as parameters. This commit uses this feature to make the post-build works for DuetPkg more user-friendly. Also, ReadMe.txt is updated to reflect the new steps for UEFI Emulation (DUET) development. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'DuetPkg/GetVariables.bat')
-rw-r--r--DuetPkg/GetVariables.bat39
1 files changed, 0 insertions, 39 deletions
diff --git a/DuetPkg/GetVariables.bat b/DuetPkg/GetVariables.bat
deleted file mode 100644
index c81d3d1..0000000
--- a/DuetPkg/GetVariables.bat
+++ /dev/null
@@ -1,39 +0,0 @@
-@echo off
-@REM ## @file
-@REM #
-@REM # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
-@REM #
-@REM # This program and the accompanying materials
-@REM # are licensed and made available under the terms and conditions of the BSD License
-@REM # which accompanies this distribution. The full text of the license may be found at
-@REM # http://opensource.org/licenses/bsd-license.php
-@REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-@REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-@REM #
-@REM #
-@REM ##
-
-
-@REM Read the variables from Conf/target.txt
-@REM Because we can't add '=' as a delimiter in 'for', each variable is read in 2 parts:
-@REM First we read the "= xyz" part of the variable assignation which we use, along with
-@REM the original equal sign for our first assignation. Then we trim any left whitespaces.
-@REM NB: default token delimiters for "for /f" are tab and space.
-
-set CONFIG_FILE=%WORKSPACE%\Conf\target.txt
-
-for /f "tokens=1*" %%i in ('type %CONFIG_FILE% ^| find "TOOL_CHAIN_TAG" ^| find /V "#"') do @set TOOL_CHAIN_TAG%%j
-for /f "tokens=*" %%i in ("%TOOL_CHAIN_TAG%") do @set TOOL_CHAIN_TAG=%%i
-
-for /f "tokens=1*" %%i in ('type %CONFIG_FILE% ^| find "TARGET" ^| find /V "#" ^| find /V "TARGET_ARCH"') do @set TARGET%%j
-for /f "tokens=*" %%i in ("%TARGET%") do @set TARGET=%%i
-
-for /f "tokens=1*" %%i in ('type %CONFIG_FILE% ^| find "TARGET_ARCH" ^|find /V "#"') do @set TARGET_ARCH%%j
-for /f "tokens=*" %%i in ("%TARGET_ARCH%") do @set TARGET_ARCH=%%i
-
-
-REM Set defaults if above variables are undefined in target.txt
-
-if "%TOOL_CHAIN_TAG%%"=="" @set TOOL_CHAIN_TAG=MYTOOLS
-if "%TARGET%"=="" @set TARGET=DEBUG
-if "%TARGET_ARCH%"=="" @set TARGET_ARCH=IA32