Skip to content

chore(build): align Makefile with project conventions#389

Merged
manusa merged 4 commits into
mainfrom
chore/align-makefile-conventions
May 21, 2026
Merged

chore(build): align Makefile with project conventions#389
manusa merged 4 commits into
mainfrom
chore/align-makefile-conventions

Conversation

@manusa
Copy link
Copy Markdown
Owner

@manusa manusa commented May 21, 2026

Summary

Restructure the Makefile to follow the same conventions used in kubernetes-mcp-server, podman-mcp-server, and com.marcnuri.automated-tasks.

Makefile

  • Add suva.sh-style make help with ##@ category banners (Build / Test / Code Quality / Development / Release) and per-target ## doc strings.
  • Switch clean to the CLEAN_TARGETS += pattern so future per-concern modules can contribute their own paths.
  • Split release into build/release.mk, auto-included via -include build/*.mk. Additional concerns (CI, packaging) can land here without churning the top-level Makefile.
  • Wire scripts/check-authors.sh in as a first-class make check-authors target. ARGS='--fix' forwards flags to the script.
  • Drop build-native-wasi — the WASI experiment is abandoned per CLAUDE.md and slated for removal.

Docs

  • Update AGENTS.md so the layout table, build & test block, and conventions reference make help, the build/*.mk includes, and make check-authors.

Out of scope

  • No behavior change for surviving targets (verified with make -n).
  • scripts/check-authors.sh is unchanged — wired in, not rewritten. A future change could rewrite it as a Go tool under native/internal/tools/ to retire scripts/.

Test plan

  • make help renders categorized output
  • make -n build-current-platform shows the enforcer-skip mvn invocation
  • make -n clean uses CLEAN_TARGETS
  • make -n check-authors invokes ./scripts/check-authors.sh
  • make -n release V=1.2.3 VS=1.3.0 runs the same git/mvn sequence as before
  • CI passes on Linux (Java 8) and Windows/macOS (Java 11)

manusa added 4 commits May 21, 2026 12:22
Restructure the Makefile to follow the same conventions used in
kubernetes-mcp-server, podman-mcp-server, and com.marcnuri.automated-tasks:

- Add suva.sh-style `make help` with `##@` category banners
  (Build / Test / Code Quality / Development / Release) and
  per-target `##` doc strings.
- Switch `clean` to the `CLEAN_TARGETS +=` pattern so per-concern
  modules can contribute their own paths.
- Split `release` into `build/release.mk`, auto-included via
  `-include build/*.mk` so additional concerns (CI, packaging)
  can land without churning the top-level Makefile.
- Wire `scripts/check-authors.sh` in as a first-class
  `make check-authors` target so the linter is discoverable via
  `make help`. `ARGS='--fix'` forwards flags to the script.
- Drop `build-native-wasi` — the WASI experiment is abandoned
  per CLAUDE.md and slated for removal.

Update AGENTS.md so the layout table, build & test block, and
conventions reference `make help`, the `build/*.mk` includes,
and `make check-authors`.
Place `.PHONY: build-current-platform` above the target-specific
`MAVEN_OPTIONS` assignment so `.PHONY` stays adjacent to the
target's main rule, matching the convention used elsewhere in the
file. Behavior is identical.
Two cross-cutting cleanups across the build/release/snapshots workflows:

- Add `make maven-deploy` to `build/release.mk` wrapping
  `mvn -Prelease clean deploy`, and replace the inline command in
  release.yml and snapshots.yml. Single source of truth for the
  Maven Central publish command.

- Extract the ~20-line apt-get disk-cleanup shell block (duplicated
  in 3 workflows) to `.github/actions/free-disk-space` as a
  composite action. CI-only sudo work belongs in a composite action,
  not a Makefile target.

Update AGENTS.md so `make maven-deploy` is listed and the CI block
references both release.yml/snapshots.yml and the new composite
action.
- Move `build-current-platform`'s target-specific `MAVEN_OPTIONS`
  assignment below the main rule so `.PHONY` is directly adjacent
  to the rule line.

- Rename the composite action's inner step to `Purge preinstalled
  software` so CI logs don't show `Free up disk space / Free up
  disk space`.
@manusa manusa merged commit 43789ae into main May 21, 2026
3 checks passed
@manusa manusa deleted the chore/align-makefile-conventions branch May 21, 2026 11:13
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