diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 74 |
1 files changed, 73 insertions, 1 deletions
@@ -29,6 +29,7 @@ EMACS ?= emacs TEST_DIR = tests MODULE_DIR = modules EMACS_HOME = $(HOME)/.emacs.d +OUT ?= themes # Test files UNIT_TESTS = $(filter-out $(TEST_DIR)/test-integration-%.el, $(wildcard $(TEST_DIR)/test-*.el)) @@ -46,8 +47,10 @@ EMACS_TEST = $(EMACS_BATCH) -L $(TEST_DIR) -L $(MODULE_DIR) # No colors - using plain text symbols instead .PHONY: help targets test test-all test-unit test-integration test-file test-name \ - test-bash benchmark coverage coverage-summary coverage-clean \ + test-bash theme-studio-test theme-studio-check theme-studio-coverage theme-studio-gen theme-studio-open theme-studio-theme theme-studio-theme-load theme-studio-theme-reload deploy-wip \ + benchmark coverage coverage-summary coverage-clean \ validate-parens validate-modules compile compile-file lint profile \ + task-sorted \ clean clean-compiled clean-tests reset # Alias for help @@ -68,6 +71,17 @@ help: @echo " make test-bash - Run the bats shell-script tests ($(words $(BASH_TESTS)) files)" @echo " make benchmark - Run performance benchmarks (:perf-tagged)" @echo "" + @echo " theme-studio (delegates to scripts/theme-studio/Makefile):" + @echo " make theme-studio-test - Full suite (Python + Node + browser gates)" + @echo " make theme-studio-check - Fast gate (regenerate + Python + Node, no browser)" + @echo " make theme-studio-coverage - JS + generate.py coverage numbers" + @echo " make theme-studio-gen - Regenerate theme-studio.html (SEED=x.json optional)" + @echo " make theme-studio-open - Regenerate and open the page in Chrome" + @echo " make theme-studio-theme JSON=/path/theme.json - Convert JSON export to themes/<name>-theme.el" + @echo " make theme-studio-theme-load THEME=name - Disable all custom themes, then load THEME" + @echo " make theme-studio-theme-reload JSON=/path.json - Convert JSON, then cleanly reload its theme" + @echo " make deploy-wip - Build WIP.json into the theme, load it live, ping silently" + @echo "" @echo " Coverage:" @echo " make coverage - Generate simplecov JSON and summarize modules" @echo " make coverage-summary - Summarize existing coverage by module" @@ -121,6 +135,57 @@ test-bash: @echo "[i] Running bats shell-script tests ($(words $(BASH_TESTS)) files)..." @bats $(BASH_TESTS) +theme-studio-test: + @$(MAKE) -C scripts/theme-studio test + +theme-studio-check: + @$(MAKE) -C scripts/theme-studio check + +theme-studio-coverage: + @$(MAKE) -C scripts/theme-studio coverage + +theme-studio-gen: + @$(MAKE) -C scripts/theme-studio gen SEED='$(SEED)' + +theme-studio-open: + @$(MAKE) -C scripts/theme-studio open SEED='$(SEED)' + +theme-studio-theme: +ifndef JSON + @echo "Error: JSON parameter required" + @echo "Usage: make theme-studio-theme JSON=/path/to/theme.json [OUT=themes]" + @exit 1 +endif + @$(MAKE) -C scripts/theme-studio theme JSON='$(abspath $(JSON))' OUT='$(abspath $(OUT))' + +theme-studio-theme-load: +ifndef THEME + @echo "Error: THEME parameter required" + @echo "Usage: make theme-studio-theme-load THEME=theme [OUT=themes]" + @exit 1 +endif + @$(MAKE) -C scripts/theme-studio theme-load THEME='$(THEME)' OUT='$(abspath $(OUT))' + +theme-studio-theme-reload: +ifndef JSON + @echo "Error: JSON parameter required" + @echo "Usage: make theme-studio-theme-reload JSON=/path/to/theme.json [OUT=themes] [THEME=name]" + @exit 1 +endif + @$(MAKE) -C scripts/theme-studio theme-reload JSON='$(abspath $(JSON))' OUT='$(abspath $(OUT))' THEME='$(THEME)' + +# Path to the theme-studio work-in-progress export. +WIP_JSON = scripts/theme-studio/WIP.json + +# Build WIP.json into themes/WIP-theme.el, load it into the running Emacs +# daemon, and fire a silent desktop notification when done. Requires the +# daemon to be up (the load goes through emacsclient). Only notifies on +# success — a build or load failure aborts make before the ping. +deploy-wip: + @$(MAKE) theme-studio-theme-reload JSON='$(WIP_JSON)' OUT='$(OUT)' THEME=WIP + @notify success "WIP theme deployed" "Built WIP.json and loaded it into Emacs." --silent + @echo "[i] WIP theme deployed and loaded into the running daemon." + BANNER = ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # Run the .el test files in $(1), each in its own Emacs, with :slow and :perf @@ -393,6 +458,13 @@ profile: --eval "(profile-dotemacs)"; \ fi +# Move completed tasks (DONE/CANCELLED level-2 subtrees) out of "Open Work" +# and into the "Resolved" section of todo.org. Wraps todo-cleanup.el's +# --archive-done; a no-op when nothing is in a closed state. +task-sorted: + @echo "Archiving resolved tasks in todo.org..." + @$(EMACS) --batch -q -l .ai/scripts/todo-cleanup.el --archive-done todo.org + clean: clean-tests clean-compiled @echo "✓ Clean complete" |
