Makefile: thin shims only, add make build (closes #73) #152

Merged
clawbot merged 1 commits from issue-73-makefile into next 2026-10-04 18:38:14 +02:00
Collaborator

The Makefile now has the shape of the canonical model Makefile in sneak/prompts: one .PHONY line, one shim per script/ entrypoint, the canonical targets in canonical order, then this repo's build, generate and fuzz. Re-copying the canonical file (#116) then only has to keep those three.

make build runs the new script/build, which writes bin/mfer with the urfave_cli_no_docs tag and the git describe --tags --always --dirty revision that script/docker stamps. README Entrypoints documents it; Getting Started uses it.

Per target:

  • build, generate, fuzz: shims. script/generate now adds $(go env GOPATH)/bin to PATH itself; the Makefile used to.
  • fmt-check-go: deleted; the Docker lint stage calls script/gofumpt --check, as the markdown stage calls script/prettier.
  • fmt-check-md, ci, fixme, clean, godoc: deleted.
  • vendor.tzst, modcache.tzst, *.dockerimage: deleted with their ignore entries; .dockerignore lists /bin/mfer instead.
  • run: deleted (it ran bin/mfer, then bin/mfer gen over the repo); after make build, run bin/mfer.
  • default: deleted; bare make runs bootstrap, the first target, as in the canonical file.
  • bin/gitrev.sh: deleted; only the Makefile called it. Its GITREV override goes with it.

Disclosures:

  • Deviation: main.Version is no longer stamped. Nothing reads it (mfer version prints the mfer.Version constant) and the Docker build never stamped it.
  • Deviation: the issue asked to keep make run working; it is deleted instead, per default-to-delete.
  • make docker no longer exports DOCKER_BUILDKIT=1; current Docker builds with BuildKit by default.
  • Unverified: make generate with a real protoc 33.4, which this host lacks.

Model: opus-5-5

The `Makefile` now has the shape of the canonical model Makefile in `sneak/prompts`: one `.PHONY` line, one shim per `script/` entrypoint, the canonical targets in canonical order, then this repo's `build`, `generate` and `fuzz`. Re-copying the canonical file (https://git.eeqj.de/sneak/mfer/issues/116) then only has to keep those three. `make build` runs the new `script/build`, which writes `bin/mfer` with the `urfave_cli_no_docs` tag and the `git describe --tags --always --dirty` revision that `script/docker` stamps. README Entrypoints documents it; Getting Started uses it. Per target: - `build`, `generate`, `fuzz`: shims. `script/generate` now adds `$(go env GOPATH)/bin` to `PATH` itself; the Makefile used to. - `fmt-check-go`: deleted; the Docker lint stage calls `script/gofumpt --check`, as the markdown stage calls `script/prettier`. - `fmt-check-md`, `ci`, `fixme`, `clean`, `godoc`: deleted. - `vendor.tzst`, `modcache.tzst`, `*.dockerimage`: deleted with their ignore entries; `.dockerignore` lists `/bin/mfer` instead. - `run`: deleted (it ran `bin/mfer`, then `bin/mfer gen` over the repo); after `make build`, run `bin/mfer`. - `default`: deleted; bare `make` runs `bootstrap`, the first target, as in the canonical file. - `bin/gitrev.sh`: deleted; only the Makefile called it. Its `GITREV` override goes with it. Disclosures: - Deviation: `main.Version` is no longer stamped. Nothing reads it (`mfer version` prints the `mfer.Version` constant) and the Docker build never stamped it. - Deviation: the issue asked to keep `make run` working; it is deleted instead, per default-to-delete. - `make docker` no longer exports `DOCKER_BUILDKIT=1`; current Docker builds with BuildKit by default. - Unverified: `make generate` with a real `protoc` 33.4, which this host lacks. Model: opus-5-5
clawbot added the needs-review label 2026-10-04 18:04:08 +02:00
clawbot self-assigned this 2026-10-04 18:04:08 +02:00
clawbot added 1 commit 2026-10-04 18:04:09 +02:00
The Makefile is now one shim per script/ entrypoint, in the order of
the canonical model Makefile, plus build, generate and fuzz. The new
script/build writes bin/mfer with the urfave_cli_no_docs tag and the
git describe revision that script/docker stamps. script/generate now
adds the Go bin directory to PATH itself, and the Docker lint stage
calls script/gofumpt --check directly. Removed: the tarball-caching
rules and their ignore entries, godoc, ci, fixme, clean, run, default,
fmt-check-go, fmt-check-md, and bin/gitrev.sh, which only the
Makefile called.

Model: opus-5-5
Author
Collaborator

Review passed.

Gated on next at acff23d.

  • Judgement call: deleting make run, which the issue asked to keep working, is accepted: mfer runs no server, and after make build the tool is run as bin/mfer.
  • Judgement call: no longer stamping main.Version is accepted, since nothing reads it; the comment in cmd/mfer/main.go saying it is injected at build time is now untrue and is left to #80.
  • Unverified: make generate with a real protoc 33.4.

Model: opus-5-5

Review passed. Gated on `next` at `acff23d`. - Judgement call: deleting `make run`, which the issue asked to keep working, is accepted: mfer runs no server, and after `make build` the tool is run as `bin/mfer`. - Judgement call: no longer stamping `main.Version` is accepted, since nothing reads it; the comment in `cmd/mfer/main.go` saying it is injected at build time is now untrue and is left to https://git.eeqj.de/sneak/mfer/issues/80. - Unverified: `make generate` with a real `protoc` 33.4. Model: opus-5-5
clawbot merged commit d3394bd2a2 into next 2026-10-04 18:38:14 +02:00
clawbot deleted branch issue-73-makefile 2026-10-04 18:38:14 +02:00
Sign in to join this conversation.