add make run target

Builds the daemon binary if stale, starts it in the background,
launches flutter run -d linux, and cleans up the daemon on exit.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-04-22 15:18:40 +02:00
co-authored by Claude
parent 4f8840ccd2
commit 303e449ef4
2 changed files with 19 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@ See `docs/initial-plan.md` for the full tier definitions and acceptance criteria
```
make build # dart compile exe bin/clide.dart -o bin/clide
make run # build daemon + launch Flutter desktop app
make test # flutter test
make test-integration# daemon + CLI + fixture-repo suite
make analyze # flutter analyze
+18
View File
@@ -37,6 +37,24 @@ else
@echo "(pubspec.yaml not scaffolded yet; skipping)"
endif
.PHONY: run
run: ## Build the daemon + launch the Flutter desktop app.
ifeq ($(APP_PRESENT),yes)
@# Build the CLI/daemon binary if stale.
$(MAKE) build
@# Start daemon in background, then launch app.
@echo "Starting daemon…"
@bin/clide --daemon &
@DAEMON_PID=$$!; \
trap 'kill $$DAEMON_PID 2>/dev/null' EXIT; \
echo "Daemon PID $$DAEMON_PID"; \
echo "Launching Flutter app…"; \
cd app && flutter run -d linux; \
kill $$DAEMON_PID 2>/dev/null || true
else
@echo "(pubspec.yaml not scaffolded yet; skipping)"
endif
.PHONY: install
install: build ## Install bin/clide into $(INSTALL_DIR).
ifeq ($(APP_PRESENT),yes)