scripts: move three scripts from lib/ to scripts/

Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
particularly belong in lib/

Also created an EXTRA_DIST= in scripts/Makefile.am instead of specifying
those files in the root Makefile.am

Closes #8625
This commit is contained in:
Daniel Stenberg 2022-03-23 15:26:09 +01:00
parent b478d59e9d
commit 8e22fc68e7
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
16 changed files with 46 additions and 43 deletions

View File

@ -143,10 +143,8 @@ PLAN9_DIST = plan9/include/mkfile \
plan9/src/mkfile plan9/src/mkfile
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \ EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \ RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework $(CMAKE_DIST) \
scripts/updatemanpages.pl $(CMAKE_DIST) \ $(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) lib/libcurl.vers.in buildconf.bat
$(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) \
lib/libcurl.vers.in buildconf.bat scripts/coverage.sh scripts/completion.pl
CLEANFILES = $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) $(VC11_LIBVCXPROJ) \ CLEANFILES = $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) $(VC11_LIBVCXPROJ) \
$(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) $(VC14_LIBVCXPROJ) \ $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) $(VC14_LIBVCXPROJ) \

View File

@ -9,8 +9,9 @@ style is more important than individual contributors having their own personal
tastes satisfied. tastes satisfied.
Our C code has a few style rules. Most of them are verified and upheld by the Our C code has a few style rules. Most of them are verified and upheld by the
`lib/checksrc.pl` script. Invoked with `make checksrc` or even by default by `scripts/checksrc.pl` script. Invoked with `make checksrc` or even by default
the build system when built after `./configure --enable-debug` has been used. by the build system when built after `./configure --enable-debug` has been
used.
It is normally not a problem for anyone to follow the guidelines, as you just It is normally not a problem for anyone to follow the guidelines, as you just
need to copy the style already used in the source code and there are no need to copy the style already used in the source code and there are no

View File

@ -67,4 +67,4 @@ CS_1 =
CS_ = $(CS_0) CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) $(srcdir)/*.c) $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.c)

View File

@ -31,7 +31,7 @@ CS_1 =
CS_ = $(CS_0) CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS)
if CURLDEBUG if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes

View File

@ -26,8 +26,7 @@ CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
EXTRA_DIST = Makefile.m32 config-win32.h config-win32ce.h config-plan9.h \ EXTRA_DIST = Makefile.m32 config-win32.h config-win32ce.h config-plan9.h \
config-riscos.h config-mac.h curl_config.h.in makefile.dj config-dos.h \ config-riscos.h config-mac.h curl_config.h.in makefile.dj config-dos.h \
libcurl.plist libcurl.rc config-amigaos.h makefile.amiga config-win32ce.h \ libcurl.plist libcurl.rc config-amigaos.h makefile.amiga config-win32ce.h \
config-os400.h setup-os400.h mk-ca-bundle.pl \ config-os400.h setup-os400.h $(CMAKE_DIST) setup-win32.h .checksrc
$(CMAKE_DIST) firefox-db2pem.sh checksrc.pl setup-win32.h .checksrc
lib_LTLIBRARIES = libcurl.la lib_LTLIBRARIES = libcurl.la
@ -128,8 +127,9 @@ CS_1 =
CS_ = $(CS_0) CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)(@PERL@ $(srcdir)/checksrc.pl -D$(srcdir) -W$(srcdir)/curl_config.h \ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
$(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] $(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch]) -W$(srcdir)/curl_config.h $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] \
$(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch])
if CURLDEBUG if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes

View File

@ -45,4 +45,4 @@ CS_1 =
CS_ = $(CS_0) CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) $(srcdir)/OS400/*.[ch]) $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/OS400/*.[ch])

View File

@ -6,7 +6,7 @@ rem * / __| | | | |_) | |
rem * | (__| |_| | _ <| |___ rem * | (__| |_| | _ <| |___
rem * \___|\___/|_| \_\_____| rem * \___|\___/|_| \_\_____|
rem * rem *
rem * Copyright (C) 2014 - 2020, Steve Holme, <steve_holme@hotmail.com>. rem * Copyright (C) 2014 - 2022, Steve Holme, <steve_holme@hotmail.com>.
rem * rem *
rem * This software is licensed as described in the file COPYING, which rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms rem * you should have received as part of this distribution. The terms
@ -113,67 +113,67 @@ rem ***************************************************************************
if "%CHECK_SRC%" == "TRUE" ( if "%CHECK_SRC%" == "TRUE" (
rem Check the src directory rem Check the src directory
if exist %SRC_DIR%\src ( 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\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\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" for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\src" "%%i"
) )
) )
if "%CHECK_LIB%" == "TRUE" ( if "%CHECK_LIB%" == "TRUE" (
rem Check the lib directory rem Check the lib directory
if exist %SRC_DIR%\lib ( 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\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\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 -Wcurl_config.h.in -Wcurl_config.h "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib" -Wcurl_config.h.cmake -Wcurl_config.h.in -Wcurl_config.h "%%i"
) )
rem Check the lib\vauth directory rem Check the lib\vauth directory
if exist %SRC_DIR%\lib\vauth ( if exist %SRC_DIR%\lib\vauth (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vauth\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vauth" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vauth\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vauth" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vauth\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vauth" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vauth\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vauth" "%%i"
) )
rem Check the lib\vquic directory rem Check the lib\vquic directory
if exist %SRC_DIR%\lib\vquic ( if exist %SRC_DIR%\lib\vquic (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vquic\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vquic" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vquic\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vquic" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vquic\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vquic" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vquic\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vquic" "%%i"
) )
rem Check the lib\vssh directory rem Check the lib\vssh directory
if exist %SRC_DIR%\lib\vssh ( if exist %SRC_DIR%\lib\vssh (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vssh\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vssh" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vssh\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vssh" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vssh\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vssh" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vssh\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vssh" "%%i"
) )
rem Check the lib\vtls directory rem Check the lib\vtls directory
if exist %SRC_DIR%\lib\vtls ( 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\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\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" for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
) )
) )
if "%CHECK_TESTS%" == "TRUE" ( if "%CHECK_TESTS%" == "TRUE" (
rem Check the tests\libtest directory rem Check the tests\libtest directory
if exist %SRC_DIR%\tests\libtest ( if exist %SRC_DIR%\tests\libtest (
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i"
) )
rem Check the tests\unit directory rem Check the tests\unit directory
if exist %SRC_DIR%\tests\unit ( if exist %SRC_DIR%\tests\unit (
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i"
) )
rem Check the tests\server directory rem Check the tests\server directory
if exist %SRC_DIR%\tests\server ( if exist %SRC_DIR%\tests\server (
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\server\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\server" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\server\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\server" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\server\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\tests\server" "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\server\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\server" "%%i"
) )
) )
if "%CHECK_EXAMPLES%" == "TRUE" ( if "%CHECK_EXAMPLES%" == "TRUE" (
rem Check the docs\examples directory rem Check the docs\examples directory
if exist %SRC_DIR%\docs\examples ( 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" -ASNPRINTF "%%i" for /f "delims=" %%i in ('dir "%SRC_DIR%\docs\examples\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\docs\examples" -ASNPRINTF "%%i"
) )
) )

View File

@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@ -19,6 +19,10 @@
# KIND, either express or implied. # KIND, either express or implied.
# #
########################################################################### ###########################################################################
EXTRA_DIST = updatemanpages.pl coverage.sh completion.pl firefox-db2pem.sh \
checksrc.pl mk-ca-bundle.pl
ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@ ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
PERL = @PERL@ PERL = @PERL@

View File

@ -135,7 +135,7 @@ endif
# ignore tool_hugehelp.c since it is generated source code and it plays # ignore tool_hugehelp.c since it is generated source code and it plays
# by slightly different rules! # by slightly different rules!
checksrc: checksrc:
$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) \ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
-W$(srcdir)/tool_hugehelp.c $(srcdir)/*.[ch]) -W$(srcdir)/tool_hugehelp.c $(srcdir)/*.[ch])
if CURLDEBUG if CURLDEBUG

View File

@ -16,7 +16,7 @@ checksrc
</name> </name>
<command type="perl"> <command type="perl">
%SRCDIR/../lib/checksrc.pl log/code%TESTNUMBER.c %SRCDIR/../scripts/checksrc.pl log/code%TESTNUMBER.c
</command> </command>
<file name="log/code%TESTNUMBER.c"> <file name="log/code%TESTNUMBER.c">
/* test source code /* test source code

View File

@ -130,7 +130,7 @@ CS_1 =
CS_ = $(CS_0) CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) $(srcdir)/*.[ch] $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.[ch]
if CURLDEBUG if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes

View File

@ -52,7 +52,7 @@ CS_1 =
CS_ = $(CS_0) CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.[ch] $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl $(srcdir)/*.[ch]
if CURLDEBUG if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes # for debug builds, we scan the sources on all regular make invokes

View File

@ -58,7 +58,7 @@ CS_1 =
CS_ = $(CS_0) CS_ = $(CS_0)
checksrc: checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.[ch] $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl $(srcdir)/*.[ch]
if BUILD_UNITTESTS if BUILD_UNITTESTS
noinst_PROGRAMS = $(UNITPROGS) noinst_PROGRAMS = $(UNITPROGS)