-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.bat
64 lines (45 loc) · 1.38 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
setlocal EnableDelayedExpansion
set inst_path=%~dp0
set KLAYOUT_BITS_INST_PATH=%inst_path%
set dest_dir=%3
set arch=%1
set kit=%2
for /d %%b in (%inst_path%bit*_*) do (
echo -----------------------------------------------
set bit_dir_name=%%~nb
set bit_name=!bit_dir_name:bit_=!
set bit_name=!bit_name:bit0_=!
set bit_name=!bit_name:bit1_=!
set bit_name=!bit_name:bit2_=!
set bit_name=!bit_name:bit3_=!
set bit_name=!bit_name:bit4_=!
set bit_name=!bit_name:bit5_=!
set bit_name=!bit_name:bit6_=!
set bit_name=!bit_name:bit7_=!
set bit_name=!bit_name:bit8_=!
set bit_name=!bit_name:bit9_=!
if exist %%b\.disabled (
set "msg=NOT building !bit_name! for %arch% (%kit%) - %%b\.disabled file exists"
echo !msg!
) else (
set "msg=Building !bit_name! for %arch% (%kit%)"
echo !msg!
echo.
set builddir=%TEMP%\klayout-bits\!bit_name!_%arch%_%kit%
set "msg=Build dir is !builddir!"
echo !msg!
if exist !builddir! rd /s /q !builddir!
mkdir !builddir!
pushd !builddir!
set instdir=%dest_dir%\%kit%\%arch%\!bit_name!
if exist !instdir! rd /s /q !instdir!
mkdir !instdir!
call %%b\build_%arch%_%kit%.bat !instdir!
if exist %%b\%arch%.pri (
copy %%b\%arch%.pri !instdir!\!bit_name!.pri
)
popd
echo Build finished.
)
)
endlocal