File: build_lua.bat

package info (click to toggle)
modsecurity-apache 2.9.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,444 kB
  • sloc: ansic: 53,551; sh: 5,249; perl: 2,341; cpp: 1,930; makefile: 618; xml: 6
file content (39 lines) | stat: -rw-r--r-- 1,107 bytes parent folder | download | duplicates (10)
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
cd "%WORK_DIR%"

@if NOT EXIST "%SOURCE_DIR%\%LUA%" goto file_not_found_bin

@7z.exe x "%SOURCE_DIR%\%LUA%" -so | 7z.exe x -aoa -si -ttar 

set LUA_DIR=%LUA:~0,-7%

move "%LUA_DIR%" "lua"

cd "lua\src"

CL /Ox /arch:SSE2 /GF /GL /Gy /FD /EHsc /MD  /Zi /TC /wd4005 /D "_MBCS" /D "LUA_CORE" /D "LUA_BUILD_AS_DLL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_WIN32" /D "_WINDLL" /c *.c
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
DEL lua.obj luac.obj
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
IF EXIST lua5.1.dll.manifest MT  -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
@if NOT (%ERRORLEVEL%) == (0) goto build_failed

cd "%WORK_DIR%"

copy /y "%WORK_DIR%\lua\src\lua5.1.dll" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\lua\src\lua5.1.pdb" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\lua\src\lua5.1.lib" "%OUTPUT_DIR%"

@exit /B 0

:file_not_found_bin
@echo File not found: "%SOURCE_DIR%\%LUA%"
@goto failed

:build_failed
@echo Problems during the building phase
@goto failed

:failed
@exit /B 1