1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

checksrc.bat: Added support for the examples

This commit is contained in:
Steve Holme 2016-04-03 22:09:07 +01:00
parent a8b51a179a
commit a3a8bba3ff

View File

@ -30,6 +30,7 @@ rem ***************************************************************************
set CHECK_LIB=TRUE
set CHECK_SRC=TRUE
set CHECK_TESTS=TRUE
set CHECK_EXAMPLES=TRUE
:parseArgs
if "%~1" == "" goto prerequisites
@ -44,14 +45,22 @@ rem ***************************************************************************
set CHECK_LIB=TRUE
set CHECK_SRC=FALSE
set CHECK_TESTS=FALSE
set CHECK_EXAMPLES=FALSE
) else if /i "%~1" == "src" (
set CHECK_LIB=FALSE
set CHECK_SRC=TRUE
set CHECK_TESTS=FALSE
set CHECK_EXAMPLES=FALSE
) else if /i "%~1" == "tests" (
set CHECK_LIB=FALSE
set CHECK_SRC=FALSE
set CHECK_TESTS=TRUE
set CHECK_EXAMPLES=FALSE
) else if /i "%~1" == "examples" (
set CHECK_LIB=FALSE
set CHECK_SRC=FALSE
set CHECK_TESTS=FALSE
set CHECK_EXAMPLES=TRUE
) else (
if not defined SRC_DIR (
set SRC_DIR=%~1%
@ -131,6 +140,13 @@ rem ***************************************************************************
)
)
if "%CHECK_EXAMPLES%" == "TRUE" (
rem Check the docs\examples directory
if exist %SRC_DIR%\docs\examples (
for /f "delims=" %%i in ('dir "%SRC_DIR%\docs\examples\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\docs\examples" "%%i"
)
)
goto success
:syntax
@ -143,6 +159,7 @@ rem ***************************************************************************
echo lib - Scan the libcurl source
echo src - Scan the command-line tool source
echo tests - Scan the library tests and unit tests
echo examples - Scan the examples
echo.
echo directory - Specifies the curl source directory
goto success