@@ -13,9 +13,34 @@ help: ## Show this help message
1313all : tools-install generate lint test # # Run complete build pipeline (tools, generate, lint, test)
1414
1515.PHONY : tools-install
16- tools-install : # # Install development tools
16+ tools-install : tools-install/checkmake # # Install development tools
1717 @./scripts/install_tools.sh --tools-dir $(TOOLS ) --bin-dir $(BIN )
1818
19+ # checkmake is installed as a pre-built binary rather than via go install
20+ # because it requires Go 1.25+, which would force an upgrade of our _tools module.
21+ # We keep the _tools module on Go 1.24.0 to match our main project requirements.
22+ # For platforms without pre-built binaries, we fall back to building from source.
23+ .PHONY : tools-install/checkmake
24+ tools-install/checkmake : # # Install checkmake binary for Makefile linting
25+ @mkdir -p $(BIN )
26+ @if [ ! -f $( BIN) /checkmake ]; then \
27+ echo " Installing checkmake..." ; \
28+ CHECKMAKE_VERSION=0.2.2; \
29+ OS=$$(uname -s | tr '[:upper:]' '[:lower:]' ) ; \
30+ ARCH=$$(uname -m ) ; \
31+ if [ " $$ ARCH" = " x86_64" ]; then ARCH=" amd64" ; fi ; \
32+ if [ " $$ ARCH" = " aarch64" ]; then ARCH=" arm64" ; fi ; \
33+ BINARY=" checkmake-$$ CHECKMAKE_VERSION.$$ OS.$$ ARCH" ; \
34+ if curl -sSfL -o $( BIN) /checkmake " https://github.com/checkmake/checkmake/releases/download/$$ CHECKMAKE_VERSION/$$ BINARY" 2> /dev/null; then \
35+ chmod +x $(BIN ) /checkmake; \
36+ echo " checkmake $$ CHECKMAKE_VERSION installed from pre-built binary" ; \
37+ else \
38+ echo " Pre-built binary not available for $$ OS/$$ ARCH, building from source..." ; \
39+ GOBIN=$(abspath $(BIN ) ) go install github.com/checkmake/checkmake/cmd/checkmake@latest; \
40+ echo " checkmake installed from source" ; \
41+ fi ; \
42+ fi
43+
1944.PHONY : clean
2045clean : # # Clean build artifacts
2146 rm -rvf coverprofile.txt * .out * .test vendor core_coverage.txt gotestsum-*
@@ -44,6 +69,10 @@ lint/go/fix: tools-install ## Fix linting issues automatically
4469lint/shell : tools-install # # Run shell script linting checks
4570 $(BIN_PATH ) ./scripts/lint.sh --shell
4671
72+ .PHONY : lint/misc
73+ lint/misc : tools-install # # Run miscellaneous linting checks (copyright, Makefiles)
74+ $(BIN_PATH ) ./scripts/lint.sh --misc
75+
4776.PHONY : format
4877format : tools-install # # Format code
4978 $(BIN_PATH ) ./scripts/format.sh --all
0 commit comments