Makefile: declare every target phony, and unhide integ-arm64 from help - #40
Merged
Merged
Conversation
.PHONY listed only `integ`. Every other target was a real file target, so a
file or directory named `test`, `run`, `fmt`, `lint` or `help` in the
repository root silently turns the matching target into a no-op that exits 0
-- CI would go green without running anything:
$ touch test
$ make test
make: `test' is up to date.
$ echo $?
0
All seven targets are now declared.
`make help` used the pattern ^[a-zA-Z_-]+: with no digit class, so
integ-arm64 carried a ## comment that help never printed. Adding 0-9 fixes it
and stays correct for any future target with a version or architecture in its
name.
Also adds a header saying what the Makefile is: convenience assuming GNU make
and a POSIX shell, not the build. The build and tests are the Go toolchain
alone, which is what lets the Windows CI job run `go test ./...` directly.
Reported and originally written by Calvin Cheng in #38.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014AXhuxzvPQrpS89q1cQKou
🤖 AI Review (klein) — turn 1The change correctly marks all documented Makefile convenience targets as phony, preventing root-level files from suppressing their recipes. It also expands the help-target grep pattern to include digits, so turn 1 (full review of ffcf2d5) · comments: total 0, active 0 (+0 new, −0 resolved) · verdict: approve |
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, independent Makefile fixes.
.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. All seven targets are now 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
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.Verification
make helpnow listsinteg-arm64touch test && make testruns the suite instead of reporting "up to date"go test ./...passes against libduckdb 1.5.5golangci-lint run→ 0 issuesCredit
The fixes and their rationale are Calvin Cheng's, from #38. That PR was closed in error — its author compared against their fork's
main, where the changes had genuinely landed, rather than this repository's. Reapplied here as a single commit against the correct base.Closes #38.