diff options
author | Gao, Liming <liming.gao@intel.com> | 2014-07-01 07:10:10 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-07-01 07:10:10 +0000 |
commit | e4ac870fe95adc7d178a79b73ad2792e0c8bfeb8 (patch) | |
tree | 7dc08edb8004fdb21d2450a88c1e7957246e8029 /BaseTools/toolsetup.bat | |
parent | 148af3872273ef476230db1d0df5ea00167853a1 (diff) | |
download | edk2-e4ac870fe95adc7d178a79b73ad2792e0c8bfeb8.zip edk2-e4ac870fe95adc7d178a79b73ad2792e0c8bfeb8.tar.gz edk2-e4ac870fe95adc7d178a79b73ad2792e0c8bfeb8.tar.bz2 |
Sync BaseTool trunk (version r2670) into EDKII BaseTools.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Liu, Yingke D (yingke.d.liu@intel.com)
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15605 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/toolsetup.bat')
-rwxr-xr-x | BaseTools/toolsetup.bat | 81 |
1 files changed, 33 insertions, 48 deletions
diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 98d0247..2afa810 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -22,32 +22,32 @@ pushd . @REM # You should not have to modify anything below this line
@REM #
-@if /I "%1"=="-h" goto Usage
-@if /I "%1"=="-help" goto Usage
-@if /I "%1"=="--help" goto Usage
-@if /I "%1"=="/h" goto Usage
-@if /I "%1"=="/help" goto Usage
-@if /I "%1"=="/?" goto Usage
+if /I "%1"=="-h" goto Usage
+if /I "%1"=="-help" goto Usage
+if /I "%1"=="--help" goto Usage
+if /I "%1"=="/h" goto Usage
+if /I "%1"=="/help" goto Usage
+if /I "%1"=="/?" goto Usage
:loop
- @if "%1"=="" goto setup_workspace
- @if /I "%1"=="--nt32" (
+ if "%1"=="" goto setup_workspace
+ if /I "%1"=="--nt32" (
@REM Ignore --nt32 flag
shift
goto loop
)
- @if /I "%1"=="Reconfig" (
+ if /I "%1"=="Reconfig" (
shift
set RECONFIG=TRUE
goto loop
)
- @if /I "%1"=="Rebuild" (
+ if /I "%1"=="Rebuild" (
shift
set REBUILD=TRUE
goto loop
)
- @if /I "%1"=="ForceRebuild" (
+ if /I "%1"=="ForceRebuild" (
shift
set FORCE_REBUILD=TRUE
goto loop
@@ -246,7 +246,8 @@ goto end )
set PATH=%BASE_TOOLS_PATH%\Bin\Win32;%PATH%
- set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python
+ set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python
+ set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%
if not defined PYTHON_HOME (
if defined PYTHONHOME (
@@ -279,8 +280,9 @@ goto end echo !!! WARNING !!! Will not be able to compile Python programs to .exe
echo Will setup environment to run Python scripts directly.
echo.
- set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python
- set PATH=%PYTHONPATH%\build;%PYTHONPATH%\GenFds;%PYTHONPATH%\Trim;%PATH%
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%
set PATHEXT=%PATHEXT%;.py
)
)
@@ -290,31 +292,16 @@ goto end echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%
echo.
- if defined VCINSTALLDIR goto VisualStudioAvailable
- if defined VS100COMNTOOLS (
- call "%VS100COMNTOOLS%\vsvars32.bat"
- ) else (
- if defined VS90COMNTOOLS (
- call "%VS90COMNTOOLS%\vsvars32.bat"
- ) else (
- if defined VS80COMNTOOLS (
- call "%VS80COMNTOOLS%\vsvars32.bat"
- ) else (
- if defined VS71COMNTOOLS (
- call "%VS71COMNTOOLS%\vsvars32.bat"
- ) else (
- echo.
- echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!
- echo.
- goto end
- )
- )
- )
+ call "%EDK_TOOLS_PATH%\get_vsvars.bat"
+ if not defined VCINSTALLDIR (
+ @echo.
+ @echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!
+ @echo.
+ goto end
)
:VisualStudioAvailable
- if defined FORCE_REBUILD goto CleanAndBuild
- goto IncrementalBuild
+ if not defined FORCE_REBUILD goto IncrementalBuild
:CleanAndBuild
pushd .
@@ -352,17 +339,17 @@ goto end goto end
:Usage
- echo.
+ @echo.
echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]]"
- echo.
- echo base_tools_path BaseTools project path, BASE_TOOLS_PATH will be set to this path.
- echo edk_tools_path EDK_TOOLS_PATH will be set to this path.
- echo Rebuild If sources are available perform an Incremental build, only
- echo build those updated tools.
- echo ForceRebuild If sources are available, rebuild all tools regardless of
- echo whether they have been updated or not.
- echo Reconfig Reinstall target.txt, tools_def.txt and build_rule.txt.
-echo.
+ @echo.
+ @echo base_tools_path BaseTools project path, BASE_TOOLS_PATH will be set to this path.
+ @echo edk_tools_path EDK_TOOLS_PATH will be set to this path.
+ @echo Rebuild If sources are available perform an Incremental build, only
+ @echo build those updated tools.
+ @echo ForceRebuild If sources are available, rebuild all tools regardless of
+ @echo whether they have been updated or not.
+ @echo Reconfig Reinstall target.txt, tools_def.txt and build_rule.txt.
+ @echo.
:end
set REBUILD=
@@ -370,5 +357,3 @@ set FORCE_REBUILD= set RECONFIG=
popd
-@echo on
-
|