X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=edksetup.bat;h=662ffc00605909cb82b8f834d13636b8bfe4cb54;hb=470626624fa31a1f50b82815dd330deb43e32e52;hp=7aa167549bb2d88c08723338641149a43d4dcf0b;hpb=4e908975c645bedd40ac77497d42629ef3cf9fc5;p=mirror_edk2.git
diff --git a/edksetup.bat b/edksetup.bat
index 7aa167549b..662ffc0060 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -3,21 +3,15 @@
@REM
@REM Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
@REM (C) Copyright 2016 Hewlett Packard Enterprise Development LP
-@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
-@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 SPDX-License-Identifier: BSD-2-Clause-Patent
@REM
@REM set CYGWIN_HOME=C:\cygwin
-@REM usage:
+@REM usage:
@REM edksetup.bat [--nt32] [AntBuild] [Rebuild] [ForceRebuild] [Reconfig]
@REM if the argument, skip is present, only the paths and the
-@REM test and set of environment settings are performed.
+@REM test and set of environment settings are performed.
@REM ##############################################################
@REM # You should not have to modify anything below this line
@@ -42,11 +36,8 @@ if %WORKSPACE% == %CD% (
:SetWorkSpace
@REM set new workspace
-@REM clear EFI_SOURCE and EDK_SOURCE for the new workspace
if not defined WORKSPACE (
set WORKSPACE=%CD%
- set EFI_SOURCE=
- set EDK_SOURCE=
)
:ParseArgs
@@ -59,29 +50,40 @@ if /I "%1"=="/help" goto Usage
if /I "%1"=="NewBuild" shift
if not defined EDK_TOOLS_PATH (
- if exist %WORKSPACE%\BaseTools (
- set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools
- ) else (
- if defined PACKAGES_PATH (
- for %%i IN (%PACKAGES_PATH%) DO (
- if exist %%~fi\BaseTools (
- set EDK_TOOLS_PATH=%%~fi\BaseTools
- goto checkNt32Flag
- )
+ goto SetEdkToolsPath
+) else (
+ goto checkNt32Flag
+)
+
+:SetEdkToolsPath
+if %WORKSPACE:~-1% EQU \ (
+ @set EDK_BASETOOLS=%WORKSPACE%BaseTools
+) else (
+ @set EDK_BASETOOLS=%WORKSPACE%\BaseTools
+)
+if exist %EDK_BASETOOLS% (
+ set EDK_TOOLS_PATH=%EDK_BASETOOLS%
+ set EDK_BASETOOLS=
+) else (
+ if defined PACKAGES_PATH (
+ for %%i IN (%PACKAGES_PATH%) DO (
+ if exist %%~fi\BaseTools (
+ set EDK_TOOLS_PATH=%%~fi\BaseTools
+ goto checkNt32Flag
)
- ) else (
- echo.
- echo !!! ERROR !!! Cannot find BaseTools !!!
- echo.
- goto BadBaseTools
)
+ ) else (
+ echo.
+ echo !!! ERROR !!! Cannot find BaseTools !!!
+ echo.
+ goto BadBaseTools
)
)
:checkNt32Flag
if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH%
-@REM The Nt32 Emluation Platform requires Microsoft Libraries
+@REM The Nt32 Emulation Platform requires Microsoft Libraries
@REM and headers to interface with Windows.
if /I "%1"=="--nt32" (
if /I "%2"=="X64" (
@@ -141,11 +143,13 @@ if defined CYGWIN_HOME (
)
:cygwin_done
+if /I "%1"=="Rebuild" shift
+if /I "%1"=="ForceRebuild" shift
if "%1"=="" goto end
:Usage
@echo.
- @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [--nt32 [X64]] [Reconfig]"
+ @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [--nt32 [X64]] [Reconfig] [Rebuild] [ForceRebuild]"
@echo --nt32 [X64] If a compiler tool chain is not available in the
@echo environment, call a script to attempt to set one up.
@echo This flag is only required if building the
@@ -157,6 +161,8 @@ if "%1"=="" goto end
@echo rebuild.
@echo.
@echo Reconfig Reinstall target.txt, tools_def.txt and build_rule.txt.
+ @echo Rebuild Perform incremental rebuild of BaseTools binaries.
+ @echo ForceRebuild Force a full rebuild of BaseTools binaries.
@echo.
@echo Note that target.template, tools_def.template and build_rules.template
@echo will only be copied to target.txt, tools_def.txt and build_rule.txt
@@ -166,4 +172,3 @@ if "%1"=="" goto end
:end
popd
-