]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Makefiles/NmakeSubdirs.bat
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / NmakeSubdirs.bat
1 @REM ## @file
2 @REM # Makefile
3 @REM #
4 @REM # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 @REM # SPDX-License-Identifier: BSD-2-Clause-Patent
6 @REM #
7
8 @echo off
9 setlocal
10 set TOOL_ERROR=0
11 SET NMAKE_COMMAND=%1
12 SHIFT
13
14 :loop
15 if "%1"=="" goto success
16
17 ECHO Building %1
18 pushd %1
19 nmake %NMAKE_COMMAND%
20 if ERRORLEVEL 1 (
21 set /A TOOL_ERROR= %TOOL_ERROR% + %ERRORLEVEL%
22 goto error
23 )
24 ECHO %1 built successfully (%NMAKE_COMMAND%)
25 ECHO.
26 shift
27 popd
28 goto loop
29
30 :success
31 goto exit
32
33 :error
34 popd
35 set /A TOOL_ERROR=%TOOL_ERROR%+%ERRORLEVEL%
36 ECHO Error while making %1!
37 VERIFY OTHER 2>NUL
38
39 :exit
40 exit /B %TOOL_ERROR%