@REM ## @file\r
+@REM # Makefile\r
@REM #\r
-@REM # Copyright (c) 2007 - 2010, 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
@REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
+@REM # \r
\r
@echo off\r
setlocal\r
+set TOOL_ERROR=0\r
SET NMAKE_COMMAND=%1\r
SHIFT\r
\r
ECHO Building %1\r
pushd %1\r
nmake %NMAKE_COMMAND%\r
-if ERRORLEVEL 1 goto error\r
+if ERRORLEVEL 1 (\r
+ set /A TOOL_ERROR= %TOOL_ERROR% + %ERRORLEVEL%\r
+ goto error\r
+)\r
ECHO %1 built successfully (%NMAKE_COMMAND%)\r
ECHO.\r
shift\r
\r
:error\r
popd\r
-ENDLOCAL\r
+set /A TOOL_ERROR=%TOOL_ERROR%+%ERRORLEVEL%\r
ECHO Error while making %1!\r
VERIFY OTHER 2>NUL\r
\r
:exit\r
+exit /B %TOOL_ERROR%\r