fix(make): check docs against the BUILD_DIR binary (#6318)

Pass the just-built binary to the flag checker when BUILD_DIR is overridden.
Preserve direct checker invocation, documentation pin precedence, and the
separately owned build-operand quoting work in PR5667.

Fixes #6197
Reported-by: bee-ghosttrack
Bead: saa-cgh.88
Agent-Signature: unknown-model/unknown-reasoning

Co-authored-by: Gas City Adopt-PR <adopt-pr@gascity.local>
This commit is contained in:
ecuthiell 2026-09-29 14:38:18 -06:00 • committed by GitHub
commit 43a526b828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -378,7 +378,7 @@ fmt-check:
check-docs:
@echo "Building bd for docs checks..."
@CGO_ENABLED=0 go build -tags "$(BUILD_TAGS)" -ldflags="-X main.Build=$(GIT_BUILD)" -o "$(BUILD_DIR)/bd" ./cmd/bd
@./scripts/check-doc-flags.sh ./bd
@./scripts/check-doc-flags.sh "$(BUILD_DIR)/bd"
@./scripts/check-doc-freshness.sh
@go test -tags=gms_pure_go ./test/docsync