autotools: minor fixes and improvements#22154
Conversation
…ith no extra options
… commands And to `sha256sum`, where missing. Also: - maketgz: pass args with `:?` to `rm -rf`, where missing. - tests/Makefile.am: drop unused remains of `MANFILES`. Follow-up to fa3f889 curl#17463 - tests/Makefile.am: fix to dist-clean `CLEANFILES`. [WIP] - tests/http/Makefile.am: add `./` prefix to glob passed to `rm -rf`. Follow-up to 6aab1dc curl#19450 Closes curl#22150
There was a problem hiding this comment.
Pull request overview
This PR refines the Autotools build/test Makefile targets and clean/dist behavior to better mirror existing CMake conveniences and to align generated-file cleanup with Automake expectations.
Changes:
- Adds top-level
testsandtest-quiettargets and adjusts top-leveltestmapping. - Updates
dist-hookfile copying to include an end-of-options marker forcp. - Cleans up tests-related Makefile logic (drop old MANFILES remnants; adjust cleanup of generated artifacts).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Makefile.am | Adds/adjusts top-level test targets and tweaks dist-hook copy invocation |
| tests/Makefile.am | Removes MANFILES linkage and changes distclean cleanup behavior |
| tests/certs/Makefile.am | Switches generated cert cleanup from DISTCLEANFILES to CLEANFILES |
| tests/http/Makefile.am | Makes rm -rf glob safer by prefixing with ./ |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| distclean: | ||
| rm -f $(MANFILES) | ||
| rm -f $(CLEANFILES) |
There was a problem hiding this comment.
Perhaps the LLM has just as little input on how this works as humans do...
I tested the LLM's theory and it failed CI:
https://github.com/curl/curl/actions/runs/28100635953/job/83201418475?pr=22154
so I conclude this is inaccurate.
Sadly the manual does not help to get a better understanding.
It must be the "heuristics".
Ref: curl#22154 (comment) "Defining a custom `distclean:` target in this Makefile overrides Automake’s default recursive `distclean` logic, which is especially problematic here because `SUBDIRS` is set. Use `distclean-local:` instead so the standard distclean behavior (including subdir recursion) is preserved."
|
• Makefile.am: use end-of-options marker for cp command in
the dist-hook target. It's not POSIX syntax, but complements
the previous similar fix made for the same target.
I don't like how we're breaking normal installation for some users, especially
since we know that none of the files in the curl repo have problematic names.
The other way to deal with this theoretical problem is ensuring that the source
name is either absolute (and therefore starts with /) or relative by prefixing
with ./
|
Indeed, I've since deleted this update from #22150. This PR message (as an aside the pre-existing |
That command invoke is for making release tarballs, so if we want we can just drop the But also. We do release tarballs on a limited set of machines and they have |
|
Let's leave it there then, I'd say, also agreeing it's paranoid (as many updates these days!). |
|
(as an aside the pre-existing -- use remains. I'm not sure how we could
avoid that: find $(distdir) -name "*.dist" -exec rm -- {} \;
I was about to suggest -delete instead of rm, but it turns out that's not POSIX
either. The *BSDs and MacOS have both but Solaris is missing -delete, so the
approach above appears to be more portable.
|
Makefile.am: add root
test-quiettarget that maps totests/quiet-test, for completeness.Ref: Tests runtests.pl script -s and -v options should override each other - and other issues #22098
tests/Makefile.am: drop unused remains of
MANFILES.Follow-up to fa3f889 tests: move test docs into /docs #17463
Also replace the
distcleantarget to deleteCLEANFILES, otherwisethe CI dist job fails. (I'm not grokking why)
tests/Makefile.am: sync up
teststarget with CMake, to passTFLAGS-a.Follow-up to 904e7ec tests: replace remaining CR bytes with the new macro
%CR#19347tests/certs/Makefile.am: fix to clean generated certs via
CLEANFILESto comply with autotools documentation, which says the previously used
variable
DISTCLEANFILESis meant for files created by./configure.Ref: https://www.gnu.org/software/automake/manual/html_node/Clean.html
Follow-up to 44341e7 runtests: generate certs dynamically, bump to EC-256, tidy up #16824
tests/http/Makefile.am: add
./prefix to glob passed torm -rfonclean, to avoid deleting unintented files, or pass unintended options.
Follow-up to 6711582 HTTPS eyeballing for --http3 mode. #10349
Cherry-picked from #22102
Cherry-picked from #22150