summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-04-03 22:09:07 +0100
committerSteve Holme <steve_holme@hotmail.com>2016-04-03 22:09:07 +0100
commita3a8bba3ff3dd737b64a28d2c65822992bfcd145 (patch)
tree4f6ff3d55992d23b7ab5323ec758d45614371910 /projects
parenta8b51a179a1b6d4c139b0c3e1b19f029cd65d89a (diff)
downloadcurl-a3a8bba3ff3dd737b64a28d2c65822992bfcd145.tar.gz
checksrc.bat: Added support for the examples
Diffstat (limited to 'projects')
-rw-r--r--projects/checksrc.bat17
1 files changed, 17 insertions, 0 deletions
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
index bb24ed746..5c83aabf9 100644
--- a/projects/checksrc.bat
+++ b/projects/checksrc.bat
@@ -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