]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Makefiles/NmakeSubdirs.bat
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / NmakeSubdirs.bat
index fac89bd9eee439a69e2147228c8a469f48bcc3ba..2ea3cf8a5f730a9f545ecfbe1b452d4e2aaf53ee 100644 (file)
@@ -1,17 +1,13 @@
 @REM ## @file\r
+@REM # Makefile\r
 @REM #\r
-@REM # Copyright (c) 2007 - 2010, 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 # http://opensource.org/licenses/bsd-license.php\r
+@REM # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+@REM # SPDX-License-Identifier: BSD-2-Clause-Patent\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
 \r
 @echo off\r
 setlocal\r
+set TOOL_ERROR=0\r
 SET NMAKE_COMMAND=%1\r
 SHIFT\r
 \r
@@ -21,7 +17,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 +32,9 @@ goto exit
 \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