From 17a37899b32bb9a32c3b58ffbd6730e44e5b10c8 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Fri, 18 Sep 2026 12:58:14 +0200 Subject: [PATCH] Fixed the DocC executable lookup in the Makefile targets. --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 02e0b5b..62f4590 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,11 @@ EXAMPLE_DIR := Examples/HelloPlaydate SWIFT_LATEST := $(HOME)/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift SWIFT_BIN ?= $(if $(wildcard $(SWIFT_LATEST)),$(SWIFT_LATEST),swift) +# Use Xcode's docc: swift.org toolchains ship an x86_64-only one that needs +# Rosetta. Override with `make docs DOCC_EXEC=/path/to/docc`. +DOCC_EXEC ?= $(shell TOOLCHAINS= xcrun --find docc 2>/dev/null) +DOCC_ENV := $(if $(DOCC_EXEC),DOCC_EXEC="$(DOCC_EXEC)") + .PHONY: help setup build test outdated upgrade embedded consumer-test check docs docs-preview example example-run clean help: ## List the available targets @@ -45,10 +50,10 @@ consumer-test: ## Build and run a scratch package depending on playdate-kit check: build test embedded consumer-test ## Everything CI runs: build, test, embedded, consumer-test docs: ## Generate the DocC documentation archive - swift package generate-documentation --target PlaydateKit + $(DOCC_ENV) swift package generate-documentation --target PlaydateKit docs-preview: ## Preview the DocC documentation in a local web server - swift package --disable-sandbox preview-documentation --target PlaydateKit + $(DOCC_ENV) swift package --disable-sandbox preview-documentation --target PlaydateKit example: ## Build the HelloPlaydate example (device + simulator pdx) $(MAKE) -C $(EXAMPLE_DIR)