2 rem ***************************************************************************
4 rem * Project ___| | | | _ \| |
5 rem * / __| | | | |_) | |
6 rem * | (__| |_| | _ <| |___
7 rem * \___|\___/|_| \_\_____|
9 rem * Copyright (C) 2014 - 2015, Steve Holme, <steve_holme@hotmail.com>.
11 rem * This software is licensed as described in the file COPYING, which
12 rem * you should have received as part of this distribution. The terms
13 rem * are also available at http://curl.haxx.se/docs/copyright.html.
15 rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
16 rem * copies of the Software, and permit persons to whom the Software is
17 rem * furnished to do so, under the terms of the COPYING file.
19 rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 rem * KIND, either express or implied.
22 rem ***************************************************************************
25 rem Check we are running on a Windows NT derived OS
26 if not "%OS%" == "Windows_NT" goto nodos
30 if /i "%~1" == "-?" goto syntax
31 if /i "%~1" == "-h" goto syntax
32 if /i "%~1" == "-help" goto syntax
35 rem Check we have Perl installed
36 echo %PATH% | findstr /I /C:"\Perl" 1>nul
38 if not exist "%SystemDrive%\Perl" (
39 if not exist "%SystemDrive%\Perl64" goto noperl
44 if "%1" == "" set SRC_DIR=..
45 if not "%1" == "" set SRC_DIR=%~1%
46 if not exist "%SRC_DIR%" goto nosrc
49 for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i"
50 for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i"
51 for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib "%%i"
52 for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib -Wcurl_config.h.cmake "%%i"
58 echo Usage: checksrc [directory]
60 echo directory - Specifies the curl source directory
65 echo Error: Only a Windows NT based Operating System is supported
70 echo Error: Perl is not installed
75 echo Error: "%SRC_DIR%" does not exist
79 if "%OS%" == "Windows_NT" endlocal