From: Viktor Szakats Date: Thu, 12 Mar 2026 00:27:47 +0000 (+0100) Subject: autotools: limit checksrc target to ignore non-repo test sources X-Git-Tag: rc-8_20_0-1~293 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ada2e3dceebb222c8da5aee864413edfd0c33b4;p=thirdparty%2Fcurl.git autotools: limit checksrc target to ignore non-repo test sources Syncing tests with lib and src behavior. Also: - fix OS400 checksrc to find the per-directory `.checksrc` file. Closes #20898 --- diff --git a/projects/Makefile.am b/projects/Makefile.am index 8b6d4dc4b2..bf7f3a05ab 100644 --- a/projects/Makefile.am +++ b/projects/Makefile.am @@ -50,7 +50,7 @@ CS_1 = CS_ = $(CS_0) checksrc: - $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/OS400/*.[ch]) + $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir)/OS400 $(srcdir)/OS400/*.[ch]) if NOT_CURL_CI if DEBUGBUILD diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index e174698a32..db7c9d741b 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -81,9 +81,7 @@ CS_ = $(CS_0) # ignore generated C files since they play by slightly different rules! checksrc: lib1521.c - $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ - -W$(srcdir)/$(BUNDLE).c \ - $(srcdir)/*.[ch]) + $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) -W$(srcdir)/$(BUNDLE).c $(FIRST_C) $(FIRST_H) $(UTILS_C) $(UTILS_H) $(TESTS_C)) if NOT_CURL_CI all-local: checksrc diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am index fe0a15eaec..5427c6df0b 100644 --- a/tests/server/Makefile.am +++ b/tests/server/Makefile.am @@ -62,11 +62,8 @@ CS_0 = @echo " RUN " $@; CS_1 = CS_ = $(CS_0) -# ignore generated C files since they play by slightly different rules! checksrc: - $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ - -W$(srcdir)/$(BUNDLE).c \ - $(srcdir)/*.[ch]) + $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) -W$(srcdir)/$(BUNDLE).c $(FIRST_C) $(FIRST_H) $(UTILS_C) $(UTILS_H) $(TESTS_C)) if NOT_CURL_CI all-local: checksrc diff --git a/tests/tunit/Makefile.am b/tests/tunit/Makefile.am index ac7e31adee..c45a4b908b 100644 --- a/tests/tunit/Makefile.am +++ b/tests/tunit/Makefile.am @@ -71,11 +71,8 @@ CS_0 = @echo " RUN " $@; CS_1 = CS_ = $(CS_0) -# ignore generated C files since they play by slightly different rules! checksrc: - $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ - -W$(srcdir)/$(BUNDLE).c \ - $(srcdir)/*.[ch]) + $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) -W$(srcdir)/$(BUNDLE).c $(TESTS_C)) if NOT_CURL_CI all-local: checksrc diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 5c87bf9ae5..34fbbf8f5f 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -75,11 +75,8 @@ CS_0 = @echo " RUN " $@; CS_1 = CS_ = $(CS_0) -# ignore generated C files since they play by slightly different rules! checksrc: - $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ - -W$(srcdir)/$(BUNDLE).c \ - $(srcdir)/*.[ch]) + $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) -W$(srcdir)/$(BUNDLE).c $(TESTS_C)) if NOT_CURL_CI all-local: checksrc