]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/Source/C/Makefiles: Fix NmakeSubdirs.bat always return 0
authorHao Wu <hao.a.wu@intel.com>
Wed, 1 Mar 2017 13:07:34 +0000 (21:07 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 2 Mar 2017 08:43:42 +0000 (16:43 +0800)
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>
BaseTools/Source/C/Makefiles/NmakeSubdirs.bat

index 4b3edfe2d6463475356ce3f69c4f857fc65f0ede..816d4fa54ff79b1ee056dd54632d39355b8530e4 100644 (file)
@@ -1,7 +1,7 @@
 @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
@@ -12,8 +12,8 @@
 @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
@@ -39,7 +39,6 @@ goto exit
 :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