In batch script file NmakeSubdirs.bat, the value changes made to the
variable 'TOOL_ERROR' within the 'setlocal...endlocal' block will not be
reflected in the return value of the script. A value of 0 will always be
returned. Thus, the script will not reflect the result of the 'nmake'
command correctly when building BaseTool source codes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
@REM ## @file\r
@REM # Makefile\r
@REM #\r
-@REM # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+@REM # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
@REM # This program and the accompanying materials\r
@REM # are licensed and made available under the terms and conditions of the BSD License\r
@REM # which accompanies this distribution. The full text of the license may be found at\r
@REM # \r
\r
@echo off\r
-@set TOOL_ERROR=0\r
setlocal\r
+set TOOL_ERROR=0\r
SET NMAKE_COMMAND=%1\r
SHIFT\r
\r
:error\r
popd\r
set /A TOOL_ERROR=%TOOL_ERROR%+%ERRORLEVEL%\r
-ENDLOCAL\r
ECHO Error while making %1!\r
VERIFY OTHER 2>NUL\r
\r