Makefile: declare every target phony, and stop hiding integ-arm64 from help - #38
Closed
calvinchengx wants to merge 2 commits into
Closed
calvinchengx wants to merge 2 commits into
calvinchengx wants to merge 2 commits into
Conversation
Without this, a file or directory named test, run, fmt, lint or help in the repository root silently turns the matching target into a no-op.
The pattern had no digit class, so integ-arm64 was documented with a ## comment that make help never printed.
Contributor
Author
|
Already on main, in fuller form: the header comment, the complete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small Makefile fixes, independent of each other and of #37.
.PHONYlisted onlyintegEvery other target was a real file target. A file or directory named
test,run,fmt,lintorhelpin the repository root silently turns the matching target into a no-op — and it exits 0, so CI would go green without running anything:testis a plausible name for someone to create. Now all seven targets are declared.make helphidinteg-arm64The pattern was
^[a-zA-Z_-]+:— no digit class — sointeg-arm64carried a##comment thatmake helpnever printed. Adding0-9fixes it, and it stays correct for any future target with a version or architecture in its name.One comment, no behaviour change
I also added a header saying what the Makefile is: convenience assuming GNU make and a POSIX shell, rather than the build. The build and tests are the Go toolchain alone, which is what lets the Windows CI job run
go test ./...directly. That felt worth stating where someone on Windows would look first, but it's a comment — drop that commit if you'd rather not carry it.Verified with
make helpandmake test.