summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-03-13 01:01:33 +0000
committerSteve Holme <steve_holme@hotmail.com>2016-03-13 01:01:33 +0000
commita8c7f0fcbfea9837a5cbd5b0904303d1f987aa49 (patch)
tree2eaca9af8c4948c45a36d94b8f3a8dbeba0f3f98 /projects
parente4a0a9ef188a55687b365e5ae18f5c6db905cdc8 (diff)
downloadcurl-a8c7f0fcbfea9837a5cbd5b0904303d1f987aa49.tar.gz
checksrc.bat: Added the ability to scan src and lib source independently
Diffstat (limited to 'projects')
-rw-r--r--projects/checksrc.bat45
1 files changed, 31 insertions, 14 deletions
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
index fecfb5bd6..719a1100e 100644
--- a/projects/checksrc.bat
+++ b/projects/checksrc.bat
@@ -27,6 +27,8 @@ rem ***************************************************************************
rem Set our variables
setlocal
+ set CHECK_LIB=TRUE
+ set CHECK_SRC=TRUE
:parseArgs
if "%~1" == "" goto prerequisites
@@ -37,6 +39,12 @@ rem ***************************************************************************
goto syntax
) else if /i "%~1" == "-help" (
goto syntax
+ ) else if /i "%~1" == "lib" (
+ set CHECK_LIB=TRUE
+ set CHECK_SRC=FALSE
+ ) else if /i "%~1" == "src" (
+ set CHECK_LIB=FALSE
+ set CHECK_SRC=TRUE
) else (
if not defined SRC_DIR (
set SRC_DIR=%~1%
@@ -68,22 +76,26 @@ rem ***************************************************************************
if not exist "%SRC_DIR%" goto nosrc
:start
- rem Check the src directory
- if exist %SRC_DIR%\src (
- for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\src" -Wtool_hugehelp.c "%%i"
- for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\src" "%%i"
+ if "%CHECK_SRC%" == "TRUE" (
+ rem Check the src directory
+ if exist %SRC_DIR%\src (
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\src" -Wtool_hugehelp.c "%%i"
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\src" "%%i"
+ )
)
- rem Check the lib directory
- if exist %SRC_DIR%\lib (
- for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" "%%i"
- for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" -Wcurl_config.h.cmake "%%i"
- )
+ if "%CHECK_LIB%" == "TRUE" (
+ rem Check the lib directory
+ if exist %SRC_DIR%\lib (
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" "%%i"
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" -Wcurl_config.h.cmake "%%i"
+ )
- rem Check the lib\vtls directory
- if exist %SRC_DIR%\lib\vtls (
- for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
- for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
+ rem Check the lib\vtls directory
+ if exist %SRC_DIR%\lib\vtls (
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
+ )
)
goto success
@@ -91,7 +103,12 @@ rem ***************************************************************************
:syntax
rem Display the help
echo.
- echo Usage: checksrc [directory]
+ echo Usage: checksrc [product] [directory]
+ echo.
+ echo Product:
+ echo.
+ echo lib - Scan the libcurl source
+ echo src - Scan the command-line tool source
echo.
echo directory - Specifies the curl source directory
goto success