]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Makefiles/NmakeSubdirs.bat
License header updated to match correct format.
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / NmakeSubdirs.bat
index fac89bd9eee439a69e2147228c8a469f48bcc3ba..4b3edfe2d6463475356ce3f69c4f857fc65f0ede 100644 (file)
@@ -1,6 +1,7 @@
 @REM ## @file\r
+@REM # Makefile\r
 @REM #\r
-@REM # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+@REM # Copyright (c) 2007 - 2014, 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
@@ -8,9 +9,10 @@
 @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
+@set TOOL_ERROR=0\r
 setlocal\r
 SET NMAKE_COMMAND=%1\r
 SHIFT\r
@@ -21,7 +23,10 @@ if "%1"=="" goto success
 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
@@ -33,8 +38,10 @@ goto exit
 \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
 :exit\r
+exit /B %TOOL_ERROR%\r