mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
iss: Better err handling in build scripts.
Now checking for errors in every step of the build phase
This commit is contained in:
parent
e25c6b2e85
commit
192599bf63
@ -12,14 +12,17 @@ set CURRENT_DIR=%cd%
|
||||
cd ..\apache2
|
||||
del *.obj *.dll *.lib
|
||||
NMAKE -f Makefile.win APACHE=..\iis\%DEPENDENCIES_DIR%\Apache24 PCRE=..\iis\%DEPENDENCIES_DIR%\pcre LIBXML2=..\iis\%DEPENDENCIES_DIR%\libxml2 LUA=..\iis\%DEPENDENCIES_DIR%\lua\src VERSION=VERSION_IIS
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
cd ..\mlogc
|
||||
nmake -f Makefile.win clean
|
||||
nmake -f Makefile.win APACHE=..\iis\%DEPENDENCIES_DIR%\Apache24 PCRE=..\iis\%DEPENDENCIES_DIR%\pcre CURL=..\iis\%DEPENDENCIES_DIR%\curl VERSION=VERSION_IIS
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
cd ..\iis
|
||||
nmake -f Makefile.win clean
|
||||
NMAKE -f Makefile.win APACHE=..\iis\%DEPENDENCIES_DIR%\Apache24 PCRE=..\iis\%DEPENDENCIES_DIR%\pcre LIBXML2=..\iis\%DEPENDENCIES_DIR%\libxml2 LUA=..\iis\%DEPENDENCIES_DIR%\lua\src VERSION=VERSION_IIS
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
cd %CURRENT_DIR%
|
||||
|
||||
@ -33,6 +36,11 @@ exit /B 0
|
||||
@echo Please specify a valid vcargs
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@cd %CURRENT_DIR%
|
||||
@exit /B
|
||||
@exit /B 1
|
||||
|
||||
|
@ -11,9 +11,10 @@ mklink /D "curl" "%CURL_DIR%"
|
||||
copy /y CMakeLists.txt "%CURL_DIR%"
|
||||
CD "%CURL_DIR%"
|
||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
"%WORK_DIR%\fart.exe" -r -C "%WORK_DIR%\%CURL_DIR%\include\curl\curlbuild.h" LLU ULL
|
||||
NMAKE
|
||||
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
copy /y "%WORK_DIR%\%CURL_DIR%\lib\libcurl.dll" "%OUTPUT_DIR%"
|
||||
@ -26,6 +27,10 @@ exit /B 0
|
||||
@echo File not found: "%SOURCE_DIR%\%CURL%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
||||
|
@ -11,7 +11,9 @@ mklink /D "libxml2" "%LIBXML2_DIR%"
|
||||
fart.exe -r -i -C "%WORK_DIR%\%LIBXML2_DIR%\win32\*.*" \x2Fopt:nowin98 " "
|
||||
cd "%LIBXML2_DIR%\win32"
|
||||
CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
NMAKE -f Makefile.msvc
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
cd "%WORK%"
|
||||
|
||||
@ -24,6 +26,10 @@ copy /y "%WORK_DIR%\%LIBXML2_DIR%\win32\bin.msvc\libxml2.lib" "%OUTPUT_DIR%"
|
||||
@echo File not found: "%SOURCE_DIR%\%LIBXML2%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
||||
|
@ -11,9 +11,12 @@ mklink /D "lua" "%LUA_DIR%"
|
||||
cd "%LUA_DIR%\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%"
|
||||
|
||||
@ -27,6 +30,10 @@ copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.lib" "%OUTPUT_DIR%"
|
||||
@echo File not found: "%SOURCE_DIR%\%LUA%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
||||
|
@ -9,7 +9,9 @@ mklink /D "pcre" "%PCRE_DIR%"
|
||||
|
||||
cd "%PCRE_DIR%"
|
||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
NMAKE
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
cd "%WORK%"
|
||||
|
||||
copy /y "%WORK_DIR%\%PCRE_DIR%\pcre.dll" "%OUTPUT_DIR%"
|
||||
@ -22,5 +24,9 @@ echo "a"
|
||||
@echo File not found: "%SOURCE_DIR%\%PCRE%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
@ -11,6 +11,7 @@ mklink /D "zlib" "%ZLIB_DIR%"
|
||||
|
||||
cd "%ZLIB_DIR%"
|
||||
nmake -f win32\Makefile.msc
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
SET INCLUDE=%INCLUDE%;%WORK_DIR%\%ZLIB_DIR%
|
||||
SET LIB=%LIB%;%WORK_DIR%\%ZLIB_DIR%
|
||||
cd "%WORK_DIR%"
|
||||
@ -25,5 +26,9 @@ copy /y "%WORK_DIR%\%ZLIB_DIR%\zdll.lib" "%OUTPUT_DIR%"
|
||||
@echo File not found: "%SOURCE_DIR%\%ZLIB%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user