-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
78 lines (57 loc) · 2.64 KB
/
Makefile
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
EMACS_DIR=.
EMACS=emacs
EMACS_BATCH=emacs --batch --script init.el
CLOC=cloc
all:
@echo "Cleaning options are: clean, clean_pcache, clean_all, prune, loaddefs."
@echo "Straight options are: pull, rebuild, check."
@echo "Extra options are: bump, cloc, ci."
clean_extras:
rm -rf $(EMACS_DIR)/local/parinfer-rust || true
rm -rf $(EMACS_DIR)/local/tree-sitter || true
rm -rf $(EMACS_DIR)/local/lsp || true
rm -rf $(EMACS_DIR)/local/extra-packages || true
rm -rf $(EMACS_DIR)/local/clean_extras || true
clean: clean_extras
rm -rf $(EMACS_DIR)/eln-cache $(EMACS_DIR)/local/eln-cache $(EMACS_DIR)/local/cache $(EMACS_DIR)/local/straight/build-*
clean_pcache:
rm -rf $(EMACS_DIR)/local/cache/pcache
clean_all: clean
cp $(EMACS_DIR)/local/straight/versions/default.el /tmp/straight-versions-default.el
rm -rf $(EMACS_DIR)/local/straight/
mkdir -p $(EMACS_DIR)/local/straight/versions/
cp /tmp/straight-versions-default.el $(EMACS_DIR)/local/straight/versions/default.el
prune: clean
cp $(EMACS_DIR)/local/straight/versions/default.el /tmp/straight-versions-default.el
rm -rf $(EMACS_DIR)/local
mkdir -p $(EMACS_DIR)/local/straight/versions/
cp /tmp/straight-versions-default.el $(EMACS_DIR)/local/straight/versions/default.el
loaddefs:
rm $(EMACS_DIR)/core/me-loaddefs.el
pull:
$(EMACS_BATCH) --eval='(straight-pull-all)'
rebuild:
$(EMACS_BATCH) --eval='(straight-rebuild-all)'
check:
$(EMACS_BATCH) --eval='(straight-check-all)'
bump:
MINEMACS_LOAD_ALL_MODULES=1 $(EMACS_BATCH) --eval='(minemacs-bump-packages)'
locked:
$(EMACS_BATCH) --eval='(minemacs-restore-locked-packages nil)'
cloc:
$(CLOC) --match-f='\.el$$' init.el early-init.el elisp/ modules/ core/ skel/
ci:
HOME=$(PWD)/.. $(EMACS) -nw --batch --script .github/workflows/scripts/ci-init.el 2>&1
ci-daemon:
HOME=$(PWD)/.. timeout 180 $(EMACS) --daemon 2>&1
gen-descriptions:
$(EMACS_BATCH) --eval='(progn (minemacs-extract-packages-descriptions) (with-current-buffer (get-buffer "*minemacs-modules-pkg-desc*") (write-file "docs/PACKAGES.md")))'
gen-external-tools:
$(EMACS_BATCH) --eval='(progn (+list-external-dependencies) (with-current-buffer (get-buffer "*external-dependencies*") (write-file "docs/EXTERNAL-TOOLS.md")))'
make-readme-markdown.el:
wget -q -O $@ https://raw.github.com/mgalgs/make-readme-markdown/master/make-readme-markdown.el
combined.el:
cat init.el early-init.el core/me-{vars,lib,lib-extra,builtin}.el modules/me-*.el modules/extras/me-*.el >combined.el
documentation: gen-descriptions gen-external-tools combined.el make-readme-markdown.el
emacs --script make-readme-markdown.el <combined.el >docs/DOCS.md 2>/dev/null
.INTERMEDIATE: make-readme-markdown.el combined.el