native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix Ghostty make targets for paths with spaces (#210)

Keep Ghostty build outputs as real Make targets so incremental rebuilds still work when an output is deleted.

Use repo-relative target and recipe paths instead of a stamp file, and remove the unused .ghostty-built ignore entry.

authored by

Stefano Bertagno and committed by
GitHub
1f02e140 5c1c97b4

+13 -14
+13 -14
Makefile
··· 7 7 MAKEFLAGS += --no-builtin-rules 8 8 9 9 # Derived values (DO NOT TOUCH). 10 - CURRENT_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) 11 - CURRENT_MAKEFILE_DIR := $(patsubst %/,%,$(dir $(CURRENT_MAKEFILE_PATH))) 12 - GHOSTTY_XCFRAMEWORK_PATH := $(CURRENT_MAKEFILE_DIR)/Frameworks/GhosttyKit.xcframework 13 - GHOSTTY_RESOURCE_PATH := $(CURRENT_MAKEFILE_DIR)/Resources/ghostty 14 - GHOSTTY_TERMINFO_PATH := $(CURRENT_MAKEFILE_DIR)/Resources/terminfo 10 + GHOSTTY_XCFRAMEWORK_PATH := Frameworks/GhosttyKit.xcframework 11 + GHOSTTY_RESOURCE_PATH := Resources/ghostty 12 + GHOSTTY_TERMINFO_PATH := Resources/terminfo 15 13 GHOSTTY_BUILD_OUTPUTS := $(GHOSTTY_XCFRAMEWORK_PATH) $(GHOSTTY_RESOURCE_PATH) $(GHOSTTY_TERMINFO_PATH) 14 + PROJECT_FILE_PATH := supacode.xcodeproj/project.pbxproj 16 15 SPM_CACHE_DIR := /tmp/supacode-spm-cache/SourcePackages 17 16 VERSION ?= 18 17 BUILD ?= ··· 23 22 help: # Display this help. 24 23 @-+echo "Run make with one of the following targets:" 25 24 @-+echo 26 - @-+grep -Eh "^[a-z-]+:.*#" "$(CURRENT_MAKEFILE_PATH)" | sed -E 's/^(.*:)(.*#+)(.*)/ \1 @@@ \3 /' | column -t -s "@@@" 25 + @-+grep -Eh "^[a-z-]+:.*#" Makefile | sed -E 's/^(.*:)(.*#+)(.*)/ \1 @@@ \3 /' | column -t -s "@@@" 27 26 28 27 build-ghostty-xcframework: $(GHOSTTY_BUILD_OUTPUTS) # Build ghostty framework 29 28 30 29 $(GHOSTTY_BUILD_OUTPUTS): 31 - @cd "$(CURRENT_MAKEFILE_DIR)/ThirdParty/ghostty" && mise exec -- zig build -Doptimize=ReleaseFast -Demit-xcframework=true -Dsentry=false 30 + @cd ThirdParty/ghostty && mise exec -- zig build -Doptimize=ReleaseFast -Demit-xcframework=true -Dsentry=false 32 31 rsync -a ThirdParty/ghostty/macos/GhosttyKit.xcframework Frameworks 33 - @src="$(CURRENT_MAKEFILE_DIR)/ThirdParty/ghostty/zig-out/share/ghostty"; \ 32 + @src="ThirdParty/ghostty/zig-out/share/ghostty"; \ 34 33 dst="$(GHOSTTY_RESOURCE_PATH)"; \ 35 - terminfo_src="$(CURRENT_MAKEFILE_DIR)/ThirdParty/ghostty/zig-out/share/terminfo"; \ 34 + terminfo_src="ThirdParty/ghostty/zig-out/share/terminfo"; \ 36 35 terminfo_dst="$(GHOSTTY_TERMINFO_PATH)"; \ 37 36 mkdir -p "$$dst"; \ 38 37 rsync -a --delete "$$src/" "$$dst/"; \ ··· 87 86 88 87 bump-version: # Bump app version (usage: make bump-version [VERSION=x.x.x] [BUILD=123]) 89 88 @if [ -z "$(VERSION)" ]; then \ 90 - current="$$(/usr/bin/awk -F' = ' '/MARKETING_VERSION = [0-9.]+;/{gsub(/;/,"",$$2);print $$2; exit}' "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj")"; \ 89 + current="$$(/usr/bin/awk -F' = ' '/MARKETING_VERSION = [0-9.]+;/{gsub(/;/,"",$$2);print $$2; exit}' "$(PROJECT_FILE_PATH)")"; \ 91 90 if [ -z "$$current" ]; then \ 92 91 echo "error: MARKETING_VERSION not found"; \ 93 92 exit 1; \ ··· 104 103 version="$(VERSION)"; \ 105 104 fi; \ 106 105 if [ -z "$(BUILD)" ]; then \ 107 - build="$$(/usr/bin/awk -F' = ' '/CURRENT_PROJECT_VERSION = [0-9]+;/{gsub(/;/,"",$$2);print $$2; exit}' "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj")"; \ 106 + build="$$(/usr/bin/awk -F' = ' '/CURRENT_PROJECT_VERSION = [0-9]+;/{gsub(/;/,"",$$2);print $$2; exit}' "$(PROJECT_FILE_PATH)")"; \ 108 107 if [ -z "$$build" ]; then \ 109 108 echo "error: CURRENT_PROJECT_VERSION not found"; \ 110 109 exit 1; \ ··· 118 117 build="$(BUILD)"; \ 119 118 fi; \ 120 119 sed -i '' "s/MARKETING_VERSION = [0-9.]*;/MARKETING_VERSION = $$version;/g" \ 121 - "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj"; \ 120 + "$(PROJECT_FILE_PATH)"; \ 122 121 sed -i '' "s/CURRENT_PROJECT_VERSION = [0-9]*;/CURRENT_PROJECT_VERSION = $$build;/g" \ 123 - "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj"; \ 124 - git add "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj"; \ 122 + "$(PROJECT_FILE_PATH)"; \ 123 + git add "$(PROJECT_FILE_PATH)"; \ 125 124 git commit -m "bump v$$version"; \ 126 125 git tag -s "v$$version" -m "v$$version"; \ 127 126 echo "version bumped to $$version (build $$build), tagged v$$version"