Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (44 loc) · 1.37 KB
/
Copy pathMakefile
File metadata and controls
54 lines (44 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.PHONY: all test compile clean lint package help
EMACS ?= emacs
# Default target
all: compile test
# Run tests with ERT
test:
$(EMACS) -Q -batch -L . -l tiddlywiki-mode.el -l tiddlywiki-mode-test.el \
-f ert-run-tests-batch-and-exit
# Byte-compile
compile:
$(EMACS) -Q -batch -L . -f batch-byte-compile tiddlywiki-mode.el
# Clean generated files
clean:
rm -f *.elc
# Check for common issues (requires package-lint)
lint:
$(EMACS) -Q -batch -L . \
--eval "(require 'package)" \
--eval "(package-initialize)" \
--eval "(require 'package-lint nil t)" \
--eval "(if (fboundp 'package-lint-batch-and-exit) \
(package-lint-batch-and-exit) \
(message \"package-lint not installed, skipping\"))" \
tiddlywiki-mode.el
# Run tests with Eldev (if installed)
eldev-test:
eldev test
# Byte-compile with Eldev
eldev-compile:
eldev compile
# Lint with Eldev
eldev-lint:
eldev lint
help:
@echo "Available targets:"
@echo " all - Compile and run tests (default)"
@echo " test - Run ERT tests"
@echo " compile - Byte-compile the package"
@echo " clean - Remove generated .elc files"
@echo " lint - Check code with package-lint"
@echo " eldev-test - Run tests using Eldev"
@echo " eldev-compile - Byte-compile using Eldev"
@echo " eldev-lint - Lint using Eldev"
@echo " help - Show this help message"