Skip to content

Makefile: declare every target phony, and unhide integ-arm64 from help - #40

Merged
fpt merged 1 commit into
mainfrom
chore/makefile-hygiene
Aug 31, 2026
Merged

fpt merged 1 commit into
mainfrom
chore/makefile-hygiene

Conversation

@fpt

@fpt fpt commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Two small, independent Makefile fixes.

.PHONY listed only integ

Every other target was a real file target. A file or directory named test, run, fmt, lint or help in the repository root silently turns the matching target into a no-op — and it exits 0, so CI would go green without running anything:

$ make test
tests ran
$ touch test
$ make test
make: `test' is up to date.
$ echo $?
0

test is a plausible name for someone to create. All seven targets are now declared.

make help hid integ-arm64

The pattern was ^[a-zA-Z_-]+: — no digit class — so integ-arm64 carried a ## comment that make help never printed. Adding 0-9 fixes 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 help now lists integ-arm64
  • touch test && make test runs the suite instead of reporting "up to date"
  • go test ./... passes against libduckdb 1.5.5
  • golangci-lint run → 0 issues

Credit

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.

.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
@github-actions

Copy link
Copy Markdown

🤖 AI Review (klein) — turn 1

The 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 integ-arm64 is now listed without changing recipe behavior. I verified the surrounding Makefile: the declared target names match the actual targets, and the updated pattern matches the documented target names. I found no correctness, compatibility, or security issues in this change.


turn 1 (full review of ffcf2d5) · comments: total 0, active 0 (+0 new, −0 resolved) · verdict: approve

@fpt
fpt merged commit ad6ee2b into main Aug 31, 2026
7 checks passed
@fpt
fpt deleted the chore/makefile-hygiene branch August 31, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant