From 5c31c2e6709979db4c949b7cd6a3cf88dec4e1aa Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 26 Jan 2025 15:28:56 +0100 Subject: [PATCH] tidy-up: `.gitignore` lines mostly - `.gitignore`: delete, dedupe and move rules upwards. Ref: 6389ba87b8e5cf74b70c54beab3498dfc773364e #13311 - `.gitignore`: fix generated test sources. Follow-up to 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772 - `.gitignore`: replace exe listings with a wildcard. - lib: move `setup-*.h` from `EXTRA_DIST` to `CURL_HFILES`. - `makedebug.bat`: uppercase an argument to match docs. - GHA/non-native: delete stray env. Follow-up to 12a6de2f660dd692cce93cb65ce6e3ec126bb531 #16043 - sort source lists. Closes #16093 --- .github/workflows/non-native.yml | 1 - .gitignore | 5 ++ CMake/CurlTests.c | 1 - docs/examples/.gitignore | 118 +-------------------------- docs/examples/Makefile.inc | 2 +- docs/libcurl/Makefile.inc | 10 +-- include/curl/.gitignore | 7 -- lib/.gitattributes | 3 - lib/.gitignore | 6 -- lib/Makefile.am | 8 +- lib/Makefile.inc | 2 + m4/.gitignore | 1 - projects/Windows/.gitignore | 10 ++- projects/Windows/VC10/.gitignore | 8 -- projects/Windows/VC10/lib/.gitignore | 10 --- projects/Windows/VC10/src/.gitignore | 10 --- projects/Windows/VC11/.gitignore | 8 -- projects/Windows/VC11/lib/.gitignore | 10 --- projects/Windows/VC11/src/.gitignore | 10 --- projects/Windows/VC12/.gitignore | 8 -- projects/Windows/VC12/lib/.gitignore | 10 --- projects/Windows/VC12/src/.gitignore | 10 --- src/.gitignore | 3 - tests/.gitignore | 6 -- tests/http/clients/.gitignore | 10 +-- tests/http/clients/Makefile.inc | 4 +- tests/libtest/.gitignore | 8 +- tests/server/.gitignore | 10 +-- tests/unit/.gitignore | 2 +- winbuild/makedebug.bat | 2 +- 30 files changed, 31 insertions(+), 272 deletions(-) delete mode 100644 include/curl/.gitignore delete mode 100644 lib/.gitattributes delete mode 100644 projects/Windows/VC10/.gitignore delete mode 100644 projects/Windows/VC10/lib/.gitignore delete mode 100644 projects/Windows/VC10/src/.gitignore delete mode 100644 projects/Windows/VC11/.gitignore delete mode 100644 projects/Windows/VC11/lib/.gitignore delete mode 100644 projects/Windows/VC11/src/.gitignore delete mode 100644 projects/Windows/VC12/.gitignore delete mode 100644 projects/Windows/VC12/lib/.gitignore delete mode 100644 projects/Windows/VC12/src/.gitignore diff --git a/.github/workflows/non-native.yml b/.github/workflows/non-native.yml index 319dd6ec98..92889affa6 100644 --- a/.github/workflows/non-native.yml +++ b/.github/workflows/non-native.yml @@ -318,7 +318,6 @@ jobs: - name: 'configure' run: | if [ -n '${{ matrix.build.generate }}' ]; then - export OPENSSL_DIR=/ # https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos [ -n '${{ matrix.build.generator }}' ] && options='-G ${{ matrix.build.generator }}' cmake -B bld -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \ diff --git a/.gitignore b/.gitignore index 9823563740..9c901f9fff 100644 --- a/.gitignore +++ b/.gitignore @@ -8,11 +8,15 @@ *.exp *.la *.lib +*.a +*.res *.lo *.o *.obj *.pdb *.pyc +*.orig +*.rej *~ .*.sw? .cproject @@ -60,6 +64,7 @@ missing mkinstalldirs tags test-driver +stamp-h* scripts/_curl scripts/curl.fish curl_fuzzer diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index 468426ef7a..1428238cb0 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -50,7 +50,6 @@ int main(void) int flags = 0; if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK)) return 1; - ; return 0; } #endif diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore index 370170743e..2e8b02b246 100644 --- a/docs/examples/.gitignore +++ b/docs/examples/.gitignore @@ -2,120 +2,4 @@ # # SPDX-License-Identifier: curl -10-at-a-time -address-scope -altsvc -anyauthput -block_ip -certinfo -chkspeed -connect-to -cookie_interface -debug -default-scheme -externalsocket -fileupload -fopen -ftp-wildcard -ftpget -ftpgetinfo -ftpgetresp -ftpsget -ftpupload -ftpuploadfrommem -ftpuploadresume -getinfo -getinmemory -getredirect -getreferrer -headerapi -hsts-preload -http-options -http-post -http2-download -http2-pushinmemory -http2-serverpush -http2-upload -http3 -http3-present -httpcustomheader -httpput -httpput-postfields -https -imap-append -imap-authzid -imap-copy -imap-create -imap-delete -imap-examine -imap-fetch -imap-list -imap-lsub -imap-multi -imap-noop -imap-search -imap-ssl -imap-store -imap-tls -interface -ipv6 -keepalive -localport -maxconnects -multi-app -multi-debugcallback -multi-double -multi-formadd -multi-legacy -multi-poll -multi-post -multi-single -netrc -new-gitignore -parseurl -persistent -pop3-authzid -pop3-dele -pop3-list -pop3-multi -pop3-noop -pop3-retr -pop3-ssl -pop3-stat -pop3-tls -pop3-top -pop3-uidl -post-callback -postinmemory -postit2 -postit2-formadd -progressfunc -protofeats -range -resolve -rtsp -rtsp-options -sendrecv -sepheaders -sftpget -sftpuploadresume -shared-connection-cache -simple -simplepost -simplessl -smtp-authzid -smtp-expn -smtp-mail -smtp-mime -smtp-multi -smtp-ssl -smtp-tls -smtp-vrfy -sslbackend -unixsocket -url2file -urlapi -usercertinmem -websocket -websocket-cb -xmlstream +/[0-9a-z_-]+ diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc index 5c03ab865b..99980e39f4 100644 --- a/docs/examples/Makefile.inc +++ b/docs/examples/Makefile.inc @@ -82,7 +82,7 @@ check_PROGRAMS = \ ipv6 \ keepalive \ localport \ - maxconnects \ + maxconnects \ multi-app \ multi-debugcallback \ multi-double \ diff --git a/docs/libcurl/Makefile.inc b/docs/libcurl/Makefile.inc index 0ae1a05389..c0d1d716f1 100644 --- a/docs/libcurl/Makefile.inc +++ b/docs/libcurl/Makefile.inc @@ -41,8 +41,8 @@ man_MANS = \ curl_easy_reset.3 \ curl_easy_send.3 \ curl_easy_setopt.3 \ - curl_easy_ssls_import.3 \ curl_easy_ssls_export.3 \ + curl_easy_ssls_import.3 \ curl_easy_strerror.3 \ curl_easy_unescape.3 \ curl_easy_upkeep.3 \ @@ -56,8 +56,8 @@ man_MANS = \ curl_global_cleanup.3 \ curl_global_init.3 \ curl_global_init_mem.3 \ - curl_global_trace.3 \ curl_global_sslset.3 \ + curl_global_trace.3 \ curl_mime_addpart.3 \ curl_mime_data.3 \ curl_mime_data_cb.3 \ @@ -87,11 +87,11 @@ man_MANS = \ curl_multi_socket_all.3 \ curl_multi_strerror.3 \ curl_multi_timeout.3 \ - curl_multi_wakeup.3 \ curl_multi_wait.3 \ curl_multi_waitfds.3 \ - curl_pushheader_bynum.3 \ + curl_multi_wakeup.3 \ curl_pushheader_byname.3 \ + curl_pushheader_bynum.3 \ curl_share_cleanup.3 \ curl_share_init.3 \ curl_share_setopt.3 \ @@ -113,8 +113,8 @@ man_MANS = \ curl_ws_recv.3 \ curl_ws_send.3 \ libcurl-easy.3 \ - libcurl-env.3 \ libcurl-env-dbg.3 \ + libcurl-env.3 \ libcurl-errors.3 \ libcurl-multi.3 \ libcurl-security.3 \ diff --git a/include/curl/.gitignore b/include/curl/.gitignore deleted file mode 100644 index 2467938825..0000000000 --- a/include/curl/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -curlver.h.dist -stamp-h2 -stamp-h3 diff --git a/lib/.gitattributes b/lib/.gitattributes deleted file mode 100644 index 7e1eea50ff..0000000000 --- a/lib/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl diff --git a/lib/.gitignore b/lib/.gitignore index 0e624c8de3..177371a2f9 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -2,12 +2,6 @@ # # SPDX-License-Identifier: curl -*.a -*.orig -*.rej -*.res -TAGS curl_config.h curl_config.h.in libcurl.vers -stamp-h1 diff --git a/lib/Makefile.am b/lib/Makefile.am index e57707850e..fa6c9756b5 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -28,11 +28,9 @@ CMAKE_DIST = CMakeLists.txt curl_config.h.cmake CHECKSRC_DIST = .checksrc vauth/.checksrc vquic/.checksrc vssh/.checksrc \ vtls/.checksrc -EXTRA_DIST = config-win32.h config-plan9.h \ - config-riscos.h config-mac.h curl_config.h.in libcurl.rc \ - config-os400.h setup-os400.h \ - $(CMAKE_DIST) setup-win32.h Makefile.soname optiontable.pl libcurl.def \ - $(CHECKSRC_DIST) +EXTRA_DIST = config-mac.h config-os400.h config-plan9.h config-riscos.h \ + config-win32.h curl_config.h.in libcurl.rc libcurl.def \ + $(CMAKE_DIST) Makefile.soname optiontable.pl $(CHECKSRC_DIST) lib_LTLIBRARIES = libcurl.la diff --git a/lib/Makefile.inc b/lib/Makefile.inc index fc6201e9e6..25c6df84ec 100644 --- a/lib/Makefile.inc +++ b/lib/Makefile.inc @@ -349,7 +349,9 @@ LIB_HFILES = \ select.h \ sendf.h \ setopt.h \ + setup-os400.h \ setup-vms.h \ + setup-win32.h \ share.h \ sigpipe.h \ slist.h \ diff --git a/m4/.gitignore b/m4/.gitignore index 59602da5a4..97cc668516 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -3,7 +3,6 @@ # SPDX-License-Identifier: curl libtool.m4 -libtool.m4.tmp ltoptions.m4 ltsugar.m4 ltversion.m4 diff --git a/projects/Windows/.gitignore b/projects/Windows/.gitignore index 257839afe4..f32b8558a2 100644 --- a/projects/Windows/.gitignore +++ b/projects/Windows/.gitignore @@ -2,7 +2,9 @@ # # SPDX-License-Identifier: curl -VC*/src/*curl.vcproj.dist -VC*/lib/*curl.vcproj.dist -VC*/src/*curl.vcxproj.dist -VC*/lib/*curl.vcxproj.dist +*.ncb +*.opensdf +*.sdf +*.suo +*.user +*.vcxproj diff --git a/projects/Windows/VC10/.gitignore b/projects/Windows/VC10/.gitignore deleted file mode 100644 index 53e3845a53..0000000000 --- a/projects/Windows/VC10/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo diff --git a/projects/Windows/VC10/lib/.gitignore b/projects/Windows/VC10/lib/.gitignore deleted file mode 100644 index 853b57dbc6..0000000000 --- a/projects/Windows/VC10/lib/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo -/*.user -/*.vcxproj diff --git a/projects/Windows/VC10/src/.gitignore b/projects/Windows/VC10/src/.gitignore deleted file mode 100644 index 853b57dbc6..0000000000 --- a/projects/Windows/VC10/src/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo -/*.user -/*.vcxproj diff --git a/projects/Windows/VC11/.gitignore b/projects/Windows/VC11/.gitignore deleted file mode 100644 index 53e3845a53..0000000000 --- a/projects/Windows/VC11/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo diff --git a/projects/Windows/VC11/lib/.gitignore b/projects/Windows/VC11/lib/.gitignore deleted file mode 100644 index 853b57dbc6..0000000000 --- a/projects/Windows/VC11/lib/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo -/*.user -/*.vcxproj diff --git a/projects/Windows/VC11/src/.gitignore b/projects/Windows/VC11/src/.gitignore deleted file mode 100644 index 853b57dbc6..0000000000 --- a/projects/Windows/VC11/src/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo -/*.user -/*.vcxproj diff --git a/projects/Windows/VC12/.gitignore b/projects/Windows/VC12/.gitignore deleted file mode 100644 index 53e3845a53..0000000000 --- a/projects/Windows/VC12/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo diff --git a/projects/Windows/VC12/lib/.gitignore b/projects/Windows/VC12/lib/.gitignore deleted file mode 100644 index 853b57dbc6..0000000000 --- a/projects/Windows/VC12/lib/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo -/*.user -/*.vcxproj diff --git a/projects/Windows/VC12/src/.gitignore b/projects/Windows/VC12/src/.gitignore deleted file mode 100644 index 853b57dbc6..0000000000 --- a/projects/Windows/VC12/src/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -/*.ncb -/*.opensdf -/*.sdf -/*.suo -/*.user -/*.vcxproj diff --git a/src/.gitignore b/src/.gitignore index 4f410a9928..1f50e57f9a 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -2,9 +2,6 @@ # # SPDX-License-Identifier: curl -*.a -*.res curl -stamp-h2 tool_ca_embed.c tool_hugehelp.c diff --git a/tests/.gitignore b/tests/.gitignore index 42b5430ca4..83cda8fceb 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -3,7 +3,6 @@ # SPDX-License-Identifier: curl *pid -*.1.dist configurehelp.pm curl_client_key curl_client_key.pub @@ -18,12 +17,7 @@ curl_ssh_config curl_sshd_config ftps_stunnel.conf https_stunnel.conf -log log* -runtests.html -runtests.pdf -testcurl.html -testcurl.pdf *.port config second-hsts.txt diff --git a/tests/http/clients/.gitignore b/tests/http/clients/.gitignore index dd6eb29e7f..2e8b02b246 100644 --- a/tests/http/clients/.gitignore +++ b/tests/http/clients/.gitignore @@ -2,12 +2,4 @@ # # SPDX-License-Identifier: curl -h2-serverpush -hx-download -hx-upload -ws-data -ws-pingpong -h2-upgrade-extreme -tls-session-reuse -h2-pausing -upload-pausing +/[0-9a-z_-]+ diff --git a/tests/http/clients/Makefile.inc b/tests/http/clients/Makefile.inc index c5e4e8afbe..d0494a3904 100644 --- a/tests/http/clients/Makefile.inc +++ b/tests/http/clients/Makefile.inc @@ -24,11 +24,11 @@ # These are all libcurl example programs to be test compiled check_PROGRAMS = \ - hx-download \ - hx-upload \ h2-pausing \ h2-serverpush \ h2-upgrade-extreme \ + hx-download \ + hx-upload \ tls-session-reuse \ upload-pausing \ ws-data \ diff --git a/tests/libtest/.gitignore b/tests/libtest/.gitignore index 9fd1a098c7..394ceae0db 100644 --- a/tests/libtest/.gitignore +++ b/tests/libtest/.gitignore @@ -2,10 +2,6 @@ # # SPDX-License-Identifier: curl -lib[1234][0-9][0-9][0-9] -lib[56][0-9][0-9] +/lib[0-9a-z_-]+ lib1521.c -libtests.c -libauthretry -libntlmconnect -libprereq +libtest_bundle.c diff --git a/tests/server/.gitignore b/tests/server/.gitignore index 57c685b4e3..b204a31e5f 100644 --- a/tests/server/.gitignore +++ b/tests/server/.gitignore @@ -2,12 +2,4 @@ # # SPDX-License-Identifier: curl -getpart -resolve -rtspd -sockfilt -sws -tftpd -socksd -disabled -mqttd +[0-9a-z_-]+ diff --git a/tests/unit/.gitignore b/tests/unit/.gitignore index a91670e0d5..18e3e0d7c5 100644 --- a/tests/unit/.gitignore +++ b/tests/unit/.gitignore @@ -3,4 +3,4 @@ # SPDX-License-Identifier: curl /unit[0-9][0-9][0-9][0-9] -units.c +unit_bundle.c diff --git a/winbuild/makedebug.bat b/winbuild/makedebug.bat index e86e668ca0..6305537e3d 100644 --- a/winbuild/makedebug.bat +++ b/winbuild/makedebug.bat @@ -28,6 +28,6 @@ where.exe nmake.exe >nul 2>&1 if %ERRORLEVEL% EQU 1 ( echo Error: Cannot find nmake.exe - be sure to run this script from within a Developer Command-Prompt ) else ( - nmake.exe /f Makefile.vc mode=static DEBUG=yes GEN_PDB=yes + nmake.exe /f Makefile.vc MODE=static DEBUG=yes GEN_PDB=yes if %ERRORLEVEL% NEQ 0 echo Error: Build Failed ) -- 2.47.3