summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-03-23 15:26:09 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-03-23 15:26:11 +0100
commit8e22fc68e7dda43e9f0b6857b1057d0e9131a4b2 (patch)
tree6fbf7a94f2636f7bdab12252bcd19caecf60de4a
parentb478d59e9dc435565a7d47d58a8b915e3d80de63 (diff)
downloadcurl-8e22fc68e7dda43e9f0b6857b1057d0e9131a4b2.tar.gz
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
-rw-r--r--Makefile.am8
-rw-r--r--docs/CODE_STYLE.md5
-rw-r--r--docs/examples/Makefile.am2
-rw-r--r--include/curl/Makefile.am2
-rw-r--r--lib/Makefile.am14
-rw-r--r--packages/Makefile.am2
-rw-r--r--projects/checksrc.bat40
-rw-r--r--scripts/Makefile.am6
-rwxr-xr-xscripts/checksrc.pl (renamed from lib/checksrc.pl)0
-rw-r--r--scripts/firefox-db2pem.sh (renamed from lib/firefox-db2pem.sh)0
-rwxr-xr-xscripts/mk-ca-bundle.pl (renamed from lib/mk-ca-bundle.pl)0
-rw-r--r--src/Makefile.am2
-rw-r--r--tests/data/test11852
-rw-r--r--tests/libtest/Makefile.am2
-rw-r--r--tests/server/Makefile.am2
-rw-r--r--tests/unit/Makefile.am2
16 files changed, 46 insertions, 43 deletions
diff --git a/Makefile.am b/Makefile.am
index 5dbe085d3..b85b81f48 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -142,11 +142,9 @@ PLAN9_DIST = plan9/include/mkfile \
plan9/src/mkfile.inc \
plan9/src/mkfile
-EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
- RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
- scripts/updatemanpages.pl $(CMAKE_DIST) \
- $(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) \
- lib/libcurl.vers.in buildconf.bat scripts/coverage.sh scripts/completion.pl
+EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
+ RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework $(CMAKE_DIST) \
+ $(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) lib/libcurl.vers.in buildconf.bat
CLEANFILES = $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) $(VC11_LIBVCXPROJ) \
$(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) $(VC14_LIBVCXPROJ) \
diff --git a/docs/CODE_STYLE.md b/docs/CODE_STYLE.md
index 530d4004d..5481aa506 100644
--- a/docs/CODE_STYLE.md
+++ b/docs/CODE_STYLE.md
@@ -9,8 +9,9 @@ style is more important than individual contributors having their own personal
tastes satisfied.
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
-the build system when built after `./configure --enable-debug` has been used.
+`scripts/checksrc.pl` script. Invoked with `make checksrc` or even by default
+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
need to copy the style already used in the source code and there are no
diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am
index d61fecbe2..dbb94289b 100644
--- a/docs/examples/Makefile.am
+++ b/docs/examples/Makefile.am
@@ -67,4 +67,4 @@ CS_1 =
CS_ = $(CS_0)
checksrc:
- $(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) $(srcdir)/*.c)
+ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.c)
diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am
index b6b194165..cad2ace03 100644
--- a/include/curl/Makefile.am
+++ b/include/curl/Makefile.am
@@ -31,7 +31,7 @@ CS_1 =
CS_ = $(CS_0)
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
# for debug builds, we scan the sources on all regular make invokes
diff --git a/lib/Makefile.am b/lib/Makefile.am
index fa9fac42f..ba5f01630 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -23,11 +23,10 @@ AUTOMAKE_OPTIONS = foreign nostdinc
CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
-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 \
- libcurl.plist libcurl.rc config-amigaos.h makefile.amiga config-win32ce.h \
- config-os400.h setup-os400.h mk-ca-bundle.pl \
- $(CMAKE_DIST) firefox-db2pem.sh checksrc.pl setup-win32.h .checksrc
+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 \
+ libcurl.plist libcurl.rc config-amigaos.h makefile.amiga config-win32ce.h \
+ config-os400.h setup-os400.h $(CMAKE_DIST) setup-win32.h .checksrc
lib_LTLIBRARIES = libcurl.la
@@ -128,8 +127,9 @@ CS_1 =
CS_ = $(CS_0)
checksrc:
- $(CHECKSRC)(@PERL@ $(srcdir)/checksrc.pl -D$(srcdir) -W$(srcdir)/curl_config.h \
- $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] $(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch])
+ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
+ -W$(srcdir)/curl_config.h $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] \
+ $(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch])
if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
diff --git a/packages/Makefile.am b/packages/Makefile.am
index c10d218f9..29c38b4fa 100644
--- a/packages/Makefile.am
+++ b/packages/Makefile.am
@@ -45,4 +45,4 @@ CS_1 =
CS_ = $(CS_0)
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])
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
index 9b4dc44d3..f3c09a352 100644
--- a/projects/checksrc.bat
+++ b/projects/checksrc.bat
@@ -6,7 +6,7 @@ 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 * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
@@ -113,67 +113,67 @@ rem ***************************************************************************
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"
+ 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%\scripts\checksrc.pl" "-D%SRC_DIR%\src" "%%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 -Wcurl_config.h.in -Wcurl_config.h "%%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%\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
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\*.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\*.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%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vauth" "%%i"
)
rem Check the lib\vquic directory
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\*.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\*.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%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vquic" "%%i"
)
rem Check the lib\vssh directory
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\*.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\*.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%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vssh" "%%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"
+ 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%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
)
)
if "%CHECK_TESTS%" == "TRUE" (
rem Check the tests\libtest directory
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\*.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\*.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%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i"
)
rem Check the tests\unit directory
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\*.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\*.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%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i"
)
rem Check the tests\server directory
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\*.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\*.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%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\server" "%%i"
)
)
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" -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"
)
)
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 214a10f6c..eaa249843 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -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
# you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
# 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@
FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
PERL = @PERL@
diff --git a/lib/checksrc.pl b/scripts/checksrc.pl
index a5211bee2..a5211bee2 100755
--- a/lib/checksrc.pl
+++ b/scripts/checksrc.pl
diff --git a/lib/firefox-db2pem.sh b/scripts/firefox-db2pem.sh
index c317ae7e1..c317ae7e1 100644
--- a/lib/firefox-db2pem.sh
+++ b/scripts/firefox-db2pem.sh
diff --git a/lib/mk-ca-bundle.pl b/scripts/mk-ca-bundle.pl
index 6c981ce1b..6c981ce1b 100755
--- a/lib/mk-ca-bundle.pl
+++ b/scripts/mk-ca-bundle.pl
diff --git a/src/Makefile.am b/src/Makefile.am
index 713124a60..cfffc32fb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -135,7 +135,7 @@ endif
# ignore tool_hugehelp.c since it is generated source code and it plays
# by slightly different rules!
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])
if CURLDEBUG
diff --git a/tests/data/test1185 b/tests/data/test1185
index 47b4f22aa..eb672efa4 100644
--- a/tests/data/test1185
+++ b/tests/data/test1185
@@ -16,7 +16,7 @@ checksrc
</name>
<command type="perl">
-%SRCDIR/../lib/checksrc.pl log/code%TESTNUMBER.c
+%SRCDIR/../scripts/checksrc.pl log/code%TESTNUMBER.c
</command>
<file name="log/code%TESTNUMBER.c">
/* test source code
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 92a9eb3cb..848acd81a 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -130,7 +130,7 @@ CS_1 =
CS_ = $(CS_0)
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
# for debug builds, we scan the sources on all regular make invokes
diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am
index fa832a198..3f9fb3982 100644
--- a/tests/server/Makefile.am
+++ b/tests/server/Makefile.am
@@ -52,7 +52,7 @@ CS_1 =
CS_ = $(CS_0)
checksrc:
- $(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.[ch]
+ $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl $(srcdir)/*.[ch]
if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index 9580facb9..f432dae36 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -58,7 +58,7 @@ CS_1 =
CS_ = $(CS_0)
checksrc:
- $(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.[ch]
+ $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl $(srcdir)/*.[ch]
if BUILD_UNITTESTS
noinst_PROGRAMS = $(UNITPROGS)