]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/toolsetup.bat
BaseTools: Improve shell wrapper for C build commands
[mirror_edk2.git] / BaseTools / toolsetup.bat
index 5ddb9b04faa47204fb91a1b9c6fc3d9295b4a9b1..76fd8bb6ef9e78188f73c4d93c3511e72dc2ba7f 100755 (executable)
@@ -3,10 +3,10 @@
 @REM   however it may be executed directly from the BaseTools project folder\r
 @REM   if the file is not executed within a WORKSPACE\BaseTools folder.\r
 @REM\r
 @REM   however it may be executed directly from the BaseTools project folder\r
 @REM   if the file is not executed within a WORKSPACE\BaseTools folder.\r
 @REM\r
-@REM Copyright (c) 2006 - 2008, Intel Corporation.  All rights reserved.\r
+@REM Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 @REM\r
 @REM This program and the accompanying materials are licensed and made available\r
 @REM\r
 @REM This program and the accompanying materials are licensed and made available\r
-@REM under the terms and conditions of the BSD Licensewhich accompanies this \r
+@REM under the terms and conditions of the BSD License which accompanies this \r
 @REM distribution.  The full text of the license may be found at:\r
 @REM   http://opensource.org/licenses/bsd-license.php\r
 @REM\r
 @REM distribution.  The full text of the license may be found at:\r
 @REM   http://opensource.org/licenses/bsd-license.php\r
 @REM\r
@@ -22,32 +22,32 @@ pushd .
 @REM # You should not have to modify anything below this line\r
 @REM #\r
 \r
 @REM # You should not have to modify anything below this line\r
 @REM #\r
 \r
-@if /I "%1"=="-h" goto Usage\r
-@if /I "%1"=="-help" goto Usage\r
-@if /I "%1"=="--help" goto Usage\r
-@if /I "%1"=="/h" goto Usage\r
-@if /I "%1"=="/help" goto Usage\r
-@if /I "%1"=="/?" goto Usage\r
+if /I "%1"=="-h" goto Usage\r
+if /I "%1"=="-help" goto Usage\r
+if /I "%1"=="--help" goto Usage\r
+if /I "%1"=="/h" goto Usage\r
+if /I "%1"=="/help" goto Usage\r
+if /I "%1"=="/?" goto Usage\r
 \r
 \r
 :loop\r
 \r
 \r
 :loop\r
-  @if "%1"=="" goto setup_workspace\r
-  @if /I "%1"=="--nt32" (\r
+  if "%1"=="" goto setup_workspace\r
+  if /I "%1"=="--nt32" (\r
     @REM Ignore --nt32 flag\r
     shift\r
     goto loop\r
   )\r
     @REM Ignore --nt32 flag\r
     shift\r
     goto loop\r
   )\r
-  @if /I "%1"=="Reconfig" (\r
+  if /I "%1"=="Reconfig" (\r
     shift\r
     set RECONFIG=TRUE\r
     goto loop\r
   )\r
     shift\r
     set RECONFIG=TRUE\r
     goto loop\r
   )\r
-  @if /I "%1"=="Rebuild" (\r
+  if /I "%1"=="Rebuild" (\r
     shift\r
     set REBUILD=TRUE\r
     goto loop\r
   )\r
     shift\r
     set REBUILD=TRUE\r
     goto loop\r
   )\r
-  @if /I "%1"=="ForceRebuild" (\r
+  if /I "%1"=="ForceRebuild" (\r
     shift\r
     set FORCE_REBUILD=TRUE\r
     goto loop\r
     shift\r
     set FORCE_REBUILD=TRUE\r
     goto loop\r
@@ -113,30 +113,43 @@ pushd .
 \r
 :set_PATH\r
   if defined WORKSPACE_TOOLS_PATH goto check_PATH\r
 \r
 :set_PATH\r
   if defined WORKSPACE_TOOLS_PATH goto check_PATH\r
-  set PATH=%EDK_TOOLS_PATH%\Bin;%EDK_TOOLS_PATH%\Bin\Win32;%PATH%\r
+  if not defined EDK_TOOLS_BIN (\r
+    if exist %EDK_TOOLS_PATH%\Bin\Win32 (\r
+      set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32\r
+    ) else (\r
+      echo.\r
+      echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
+      echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
+      echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
+      echo. \r
+      goto end\r
+    )\r
+  )\r
+  set PATH=%EDK_TOOLS_BIN%;%PATH%\r
   set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH%\r
   goto PATH_ok\r
 \r
 :check_PATH\r
   if "%EDK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto PATH_ok\r
   set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH%\r
   goto PATH_ok\r
 \r
 :check_PATH\r
   if "%EDK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto PATH_ok\r
-  set PATH=%EDK_TOOLS_PATH%\Bin;%EDK_TOOLS_PATH%\Bin\Win32;%PATH%\r
+  if not defined EDK_TOOLS_BIN (\r
+    if exist %EDK_TOOLS_PATH%\Bin\Win32 (\r
+      set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32\r
+    ) else (\r
+      echo.\r
+      echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
+      echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
+      echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
+      echo. \r
+      goto end\r
+    )\r
+  )\r
+  set PATH=%EDK_TOOLS_BIN%;%PATH%\r
   set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH%\r
   echo Resetting the PATH variable to include the EDK_TOOLS_PATH for this session.\r
 \r
 :PATH_ok\r
   set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH%\r
   echo Resetting the PATH variable to include the EDK_TOOLS_PATH for this session.\r
 \r
 :PATH_ok\r
-  echo           PATH      = %PATH%\r
-  echo.\r
-  if defined WORKSPACE (\r
-    echo      WORKSPACE      = %WORKSPACE%\r
-  )\r
-  echo EDK_TOOLS_PATH      = %EDK_TOOLS_PATH%\r
-  if defined BASE_TOOLS_PATH (\r
-    echo BASE_TOOLS_PATH     = %BASE_TOOLS_PATH%\r
-  )\r
-  echo.\r
-\r
 REM\r
 REM\r
-REM copy *.template to %WORKSPACE%\Conf\r
+REM copy *.template to %CONF_PATH%\r
 REM\r
 if not defined WORKSPACE (\r
    if defined RECONFIG (\r
 REM\r
 if not defined WORKSPACE (\r
    if defined RECONFIG (\r
@@ -147,57 +160,80 @@ if not defined WORKSPACE (
    goto skip_reconfig\r
 )\r
 \r
    goto skip_reconfig\r
 )\r
 \r
-if NOT exist %WORKSPACE%\Conf (\r
-  mkdir %WORKSPACE%\Conf\r
+set CONF_PATH=%WORKSPACE%\Conf\r
+if NOT exist %CONF_PATH% (\r
+  if defined PACKAGES_PATH (\r
+    for %%i IN (%PACKAGES_PATH%) DO (\r
+      if exist %%~fi\Conf (\r
+        set CONF_PATH=%%i\Conf\r
+        goto CopyConf\r
+      )\r
+    )\r
+  )\r
+)\r
\r
+:CopyConf\r
+if NOT exist %CONF_PATH% (\r
+  mkdir %CONF_PATH%\r
 ) else (\r
   if defined RECONFIG (\r
     echo.\r
 ) else (\r
   if defined RECONFIG (\r
     echo.\r
-    echo  Over-writing the files in the WORKSPACE\Conf directory\r
+    echo  Over-writing the files in the CONF_PATH directory\r
     echo  using the default template files\r
     echo.\r
   )\r
 )\r
 \r
     echo  using the default template files\r
     echo.\r
   )\r
 )\r
 \r
-if NOT exist %WORKSPACE%\Conf\FrameworkDatabase.db (\r
-  if defined RECONFIG echo copying ... FrameworkDatabase.template to %WORKSPACE%\Conf\FrameworkDatabase.db\r
-  copy %EDK_TOOLS_PATH%\Conf\FrameworkDatabase.template %WORKSPACE%\Conf\FrameworkDatabase.db > nul\r
-) else (\r
-  if defined RECONFIG echo over-write ... FrameworkDatabase.template to %WORKSPACE%\Conf\FrameworkDatabase.db\r
-  if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\FrameworkDatabase.template %WORKSPACE%\Conf\FrameworkDatabase.db > nul\r
-)\r
-\r
-if NOT exist %WORKSPACE%\Conf\target.txt (\r
-  echo copying ... target.template to %WORKSPACE%\Conf\target.txt\r
+if NOT exist %CONF_PATH%\target.txt (\r
+  echo copying ... target.template to %CONF_PATH%\target.txt\r
   if NOT exist %EDK_TOOLS_PATH%\Conf\target.template (\r
     echo Error: target.template is missing at folder %EDK_TOOLS_PATH%\Conf\\r
   )\r
   if NOT exist %EDK_TOOLS_PATH%\Conf\target.template (\r
     echo Error: target.template is missing at folder %EDK_TOOLS_PATH%\Conf\\r
   )\r
-  copy %EDK_TOOLS_PATH%\Conf\target.template %WORKSPACE%\Conf\target.txt > nul\r
+  copy %EDK_TOOLS_PATH%\Conf\target.template %CONF_PATH%\target.txt > nul\r
 ) else (\r
 ) else (\r
-  if defined RECONFIG echo over-write ... target.template to %WORKSPACE%\Conf\target.txt\r
-  if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\target.template %WORKSPACE%\Conf\target.txt > nul\r
+  if defined RECONFIG echo over-write ... target.template to %CONF_PATH%\target.txt\r
+  if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\target.template %CONF_PATH%\target.txt > nul\r
 )\r
 \r
 )\r
 \r
-if NOT exist %WORKSPACE%\Conf\tools_def.txt (\r
-  echo copying ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt\r
+if NOT exist %CONF_PATH%\tools_def.txt (\r
+  echo copying ... tools_def.template to %CONF_PATH%\tools_def.txt\r
   if NOT exist %EDK_TOOLS_PATH%\Conf\tools_def.template (\r
     echo Error: tools_def.template is missing at folder %EDK_TOOLS_PATH%\Conf\\r
   )\r
   if NOT exist %EDK_TOOLS_PATH%\Conf\tools_def.template (\r
     echo Error: tools_def.template is missing at folder %EDK_TOOLS_PATH%\Conf\\r
   )\r
-  copy %EDK_TOOLS_PATH%\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt > nul\r
+  copy %EDK_TOOLS_PATH%\Conf\tools_def.template %CONF_PATH%\tools_def.txt > nul\r
 ) else (\r
 ) else (\r
-  if defined RECONFIG echo over-write ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt\r
-  if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt > nul\r
+  if defined RECONFIG echo over-write ... tools_def.template to %CONF_PATH%\tools_def.txt\r
+  if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\tools_def.template %CONF_PATH%\tools_def.txt > nul\r
 )\r
 \r
 )\r
 \r
-if NOT exist %WORKSPACE%\Conf\build_rule.txt (\r
-  echo copying ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt\r
+if NOT exist %CONF_PATH%\build_rule.txt (\r
+  echo copying ... build_rule.template to %CONF_PATH%\build_rule.txt\r
   if NOT exist %EDK_TOOLS_PATH%\Conf\build_rule.template (\r
     echo Error: build_rule.template is missing at folder %EDK_TOOLS_PATH%\Conf\\r
   )\r
   if NOT exist %EDK_TOOLS_PATH%\Conf\build_rule.template (\r
     echo Error: build_rule.template is missing at folder %EDK_TOOLS_PATH%\Conf\\r
   )\r
-  copy %EDK_TOOLS_PATH%\Conf\build_rule.template %WORKSPACE%\Conf\build_rule.txt > nul\r
+  copy %EDK_TOOLS_PATH%\Conf\build_rule.template %CONF_PATH%\build_rule.txt > nul\r
 ) else (\r
 ) else (\r
-  if defined RECONFIG echo over-write ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt\r
-  if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\build_rule.template %WORKSPACE%\Conf\build_rule.txt > nul\r
+  if defined RECONFIG echo over-write ... build_rule.template to %CONF_PATH%\build_rule.txt\r
+  if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\build_rule.template %CONF_PATH%\build_rule.txt > nul\r
+)\r
+\r
+echo           PATH      = %PATH%\r
+echo.\r
+if defined WORKSPACE (\r
+  echo      WORKSPACE      = %WORKSPACE%\r
+)\r
+if defined PACKAGES_PATH (\r
+  echo  PACKAGES_PATH      = %PACKAGES_PATH%\r
 )\r
 )\r
+echo EDK_TOOLS_PATH      = %EDK_TOOLS_PATH%\r
+if defined BASE_TOOLS_PATH (\r
+  echo BASE_TOOLS_PATH     = %BASE_TOOLS_PATH%\r
+)\r
+if defined EDK_TOOLS_BIN (\r
+  echo  EDK_TOOLS_BIN      = %EDK_TOOLS_BIN%\r
+)\r
+echo      CONF_PATH      = %CONF_PATH%\r
+echo.\r
 \r
 :skip_reconfig\r
 \r
 \r
 :skip_reconfig\r
 \r
@@ -206,28 +242,26 @@ if NOT exist %WORKSPACE%\Conf\build_rule.txt (
 @REM\r
 if defined FORCE_REBUILD goto check_build_environment\r
 if defined REBUILD goto check_build_environment\r
 @REM\r
 if defined FORCE_REBUILD goto check_build_environment\r
 if defined REBUILD goto check_build_environment\r
-if not exist "%EDK_TOOLS_PATH%\Bin" goto check_build_environment\r
-\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\BootSectImage.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\build.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\EfiLdrImage.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\EfiRom.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenBootSector.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenFds.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenFfs.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenFv.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenFw.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenPage.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenSec.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\GenVtf.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\MigrationMsa2Inf.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\Split.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\TargetTool.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\TianoCompress.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\Trim.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\VfrCompile.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\Fpd2Dsc.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\VolInfo.exe" goto check_build_environment\r
+if not exist "%EDK_TOOLS_PATH%" goto check_build_environment\r
+\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\BootSectImage.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\build.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\EfiLdrImage.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\EfiRom.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenBootSector.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenFds.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenFfs.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenFv.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenFw.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenPage.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenSec.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\GenVtf.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\Split.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\TargetTool.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\TianoCompress.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\Trim.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\VfrCompile.exe" goto check_build_environment\r
+IF NOT EXIST "%EDK_TOOLS_BIN%\VolInfo.exe" goto check_build_environment\r
 \r
 goto end\r
 \r
 \r
 goto end\r
 \r
@@ -254,14 +288,15 @@ goto end
   )\r
   set PATH=%BASE_TOOLS_PATH%\Bin\Win32;%PATH%\r
 \r
   )\r
   set PATH=%BASE_TOOLS_PATH%\Bin\Win32;%PATH%\r
 \r
-  set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python\r
+  set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python\r
+  set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%\r
 \r
   if not defined PYTHON_HOME (\r
     if defined PYTHONHOME (\r
       set PYTHON_HOME=%PYTHONHOME%\r
     ) else (\r
       echo.\r
 \r
   if not defined PYTHON_HOME (\r
     if defined PYTHONHOME (\r
       set PYTHON_HOME=%PYTHONHOME%\r
     ) else (\r
       echo.\r
-      echo  !!! ERROR !!! PYTHON is required to build or execute the tools !!!\r
+      echo  !!! ERROR !!! PYTHON_HOME is required to build or execute the tools, please set it. !!!\r
       echo.\r
       goto end\r
     )\r
       echo.\r
       goto end\r
     )\r
@@ -287,8 +322,9 @@ goto end
       echo !!! WARNING !!! Will not be able to compile Python programs to .exe\r
       echo Will setup environment to run Python scripts directly.\r
       echo.\r
       echo !!! WARNING !!! Will not be able to compile Python programs to .exe\r
       echo Will setup environment to run Python scripts directly.\r
       echo.\r
-      set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python\r
-      set PATH=%PYTHONPATH%\build;%PYTHONPATH%\GenFds;%PYTHONPATH%\Trim;%PATH%\r
+      set "PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%"\r
+      set "PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%"\r
+      set "PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%"\r
       set PATHEXT=%PATHEXT%;.py\r
     )\r
   )\r
       set PATHEXT=%PATHEXT%;.py\r
     )\r
   )\r
@@ -298,23 +334,16 @@ goto end
   echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%\r
   echo.\r
 \r
   echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%\r
   echo.\r
 \r
-  if defined VCINSTALLDIR goto VisualStudioAvailable\r
-  if defined VS71COMNTOOLS (\r
-    call "%VS71COMNTOOLS%\vsvars32.bat"\r
-  ) else (\r
-    if defined VS80COMNTOOLS (\r
-      call "%VS80COMNTOOLS%\vsvars32.bat"\r
-    ) else (\r
-      echo.\r
-      echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!\r
-      echo.\r
-      goto end\r
-    )\r
+  call "%EDK_TOOLS_PATH%\get_vsvars.bat"\r
+  if not defined VCINSTALLDIR (\r
+    @echo.\r
+    @echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!\r
+    @echo.\r
+    goto end\r
   )\r
 \r
 :VisualStudioAvailable\r
   )\r
 \r
 :VisualStudioAvailable\r
-  if defined FORCE_REBUILD goto CleanAndBuild\r
-  goto IncrementalBuild\r
+  if not defined FORCE_REBUILD goto IncrementalBuild\r
 \r
 :CleanAndBuild\r
   pushd .\r
 \r
 :CleanAndBuild\r
   pushd .\r
@@ -352,17 +381,17 @@ goto end
   goto end\r
 \r
 :Usage\r
   goto end\r
 \r
 :Usage\r
-  echo.\r
+  @echo.\r
   echo  Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]]"\r
   echo  Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]]"\r
-  echo.\r
-  echo         base_tools_path   BaseTools project path, BASE_TOOLS_PATH will be set to this path. \r
-  echo         edk_tools_path    EDK_TOOLS_PATH will be set to this path.\r
-  echo         Rebuild           If sources are available perform an Incremental build, only \r
-  echo                           build those updated tools.\r
-  echo         ForceRebuild      If sources are available, rebuild all tools regardless of \r
-  echo                           whether they have been updated or not.\r
-  echo         Reconfig          Reinstall target.txt, tools_def.txt and build_rule.txt.\r
-echo.\r
+  @echo.\r
+  @echo         base_tools_path   BaseTools project path, BASE_TOOLS_PATH will be set to this path. \r
+  @echo         edk_tools_path    EDK_TOOLS_PATH will be set to this path.\r
+  @echo         Rebuild           If sources are available perform an Incremental build, only \r
+  @echo                           build those updated tools.\r
+  @echo         ForceRebuild      If sources are available, rebuild all tools regardless of \r
+  @echo                           whether they have been updated or not.\r
+  @echo         Reconfig          Reinstall target.txt, tools_def.txt and build_rule.txt.\r
+  @echo.\r
 \r
 :end\r
 set REBUILD=\r
 \r
 :end\r
 set REBUILD=\r
@@ -370,5 +399,3 @@ set FORCE_REBUILD=
 set RECONFIG=\r
 popd\r
 \r
 set RECONFIG=\r
 popd\r
 \r
-@echo on\r
-\r