Debian Codegraph @

src/vendor/azure-uamqp-c/build_all/mbed/build.cmd

raw
1
2 @setlocal EnableExtensions EnableDelayedExpansion
3 @echo off
4
5 set current-path=%~dp0
6 rem // remove trailing slash
7 set current-path=%current-path:~0,-1%
8
9 set repo-build-root=%current-path%\..\..
10 rem // resolve to fully qualified path
11 for %%i in ("%repo-build-root%") do set repo-build-root=%%~fi
12
13 rem -----------------------------------------------------------------------------
14 rem -- build (clean) compilembed tool
15 rem -----------------------------------------------------------------------------
16
17 call "%repo-build-root%\deps\azure-c-shared-utility\tools\compilembed\build.cmd" --clean
18 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!
19
20 rem -----------------------------------------------------------------------------
21 rem -- build uAMQP and samples
22 rem -----------------------------------------------------------------------------
23
24 call %repo-build-root%\deps\azure-c-shared-utility\tools\mbed_build_scripts\release_mbed_project.cmd %repo-build-root%\build_all
25 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!
26
27 call :compile message_sender_sample %repo-build-root%\samples\message_sender_sample\mbed
28 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!
29
30 goto :eof
31
32 :compile
33 setlocal EnableExtensions
34 set "project_name=%~1"
35 set "project_path=%~2"
36 set "download_bin_path=%~3"
37 set "cmake_project_bin_path=%project_name%_cmake_build"
38
39 mkdir %cmake_project_bin_path%
40 cd %cmake_project_bin_path%
41 cmake -Dmbed_repo_name:string=%project_name% -Dmbed_output_bin_path:string=%download_bin_path% %project_path%
42 set CMAKE_ERROR_CODE=!ERRORLEVEL!
43 cd ..
44 exit /b %CMAKE_ERROR_CODE%
45 goto:eof
46