diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-04 08:42:57 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-04 08:42:57 -0600 |
| commit | 520203cfb54091dae7647a51a5910bb094fd1c4f (patch) | |
| tree | bf9fd8728c4d7b5ca3c6c5e03993fa4b5d2be6fd | |
| parent | 9e7c7e94b1f253a77117f36a698b2321214a77cb (diff) | |
feat:Makefile: Add dependency installation target
Add a new `install-deps` target to the Makefile for setting up
required dependencies, specifically `xterm-color`, using MELPA
package repository. Enhance test process by including package
initialization in `EMACS_TEST` command.
| -rw-r--r-- | Makefile | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -32,10 +32,14 @@ TEST_UTIL_FILES = $(wildcard $(TEST_DIR)/testutil-*.el) # Emacs batch flags EMACS_BATCH = $(EMACS) --batch --no-site-file --no-site-lisp -EMACS_TEST = $(EMACS_BATCH) -L $(PROJECT_ROOT) -L $(TEST_DIR) +EMACS_TEST = $(EMACS_BATCH) \ + --eval "(require 'package)" \ + --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \ + --eval "(package-initialize)" \ + -L $(PROJECT_ROOT) -L $(TEST_DIR) .PHONY: help test test-all test-unit test-integration test-file test-name \ - validate-parens validate compile lint \ + validate-parens validate compile lint install-deps \ clean clean-compiled clean-tests # Default target @@ -57,6 +61,9 @@ help: @echo " make compile - Byte-compile wttrin.el" @echo " make lint - Run all linters (checkdoc, package-lint, elisp-lint)" @echo "" + @echo " Setup:" + @echo " make install-deps - Install required dependencies (xterm-color)" + @echo "" @echo " Utilities:" @echo " make clean - Remove test artifacts and compiled files" @echo " make clean-compiled - Remove .elc/.eln files only" @@ -194,6 +201,20 @@ lint: echo "⚠ Linting issues found" # ============================================================================ +# Setup Targets +# ============================================================================ + +install-deps: + @echo "Installing dependencies..." + @$(EMACS) --batch \ + --eval "(require 'package)" \ + --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \ + --eval "(package-initialize)" \ + --eval "(unless package-archive-contents (package-refresh-contents))" \ + --eval "(package-install 'xterm-color)" + @echo "✓ Dependencies installed" + +# ============================================================================ # Utility Targets # ============================================================================ |
