-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (54 loc) · 1.65 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
all: test weave
.PHONY: all
test: tangle
LILAC_ROOT=$(LILAC_ROOT) emacs --quick --batch --kill --load ert \
--load lilac.el \
--load lilac-tests.el \
--funcall ert-run-tests-batch-and-exit
.PHONY: test
weave: lint README.html developer-guide.html
.PHONY: weave
README.html: README.org
$(call run_emacs,(lilac-publish),$<)
developer-guide.html: developer-guide.org
$(call run_emacs,(lilac-publish),$<)
syntax-highlighting.css:
$(call run_emacs_nobatch,(lilac-gen-css-and-exit),)
.PHONY: syntax-highlighting.css
# tangled_output are all files that are generated by tangling developer-guide.org.
tangled_output = \
citations-developer-guide.bib \
lilac.css \
lilac.el \
lilac-tests.el \
lilac.js \
lilac.theme \
.gitattributes \
.gitignore \
Makefile \
shell.nix
tangle $(tangled_output) &: developer-guide.org
# Generate the toplevel Makefile (this file) and others as described in
# tangled_output. In a way this bootstraps the whole literate-programming
# pipeline.
$(call run_emacs,(lilac-tangle),developer-guide.org)
touch tangle
define run_emacs
LILAC_ROOT=$(LILAC_ROOT) emacs $(2) --quick --batch --kill \
--load $(LILAC_ROOT)/lilac.el --eval="$(1)"
endef
define run_emacs_nobatch
LILAC_ROOT=$(LILAC_ROOT) emacs $(2) --quick --kill \
--load $(LILAC_ROOT)/lilac.el --eval="$(1)"
endef
LILAC_ROOT := $(shell git rev-parse --show-toplevel)
lint: spellcheck
.PHONY: lint
spellcheck: README.org developer-guide.org
typos
.PHONY: spellcheck
nixpkgs_stable_channel := nixos-24.05
update-deps: package/nix/sources.json package/nix/sources.nix
cd package && niv update nixpkgs --branch $(nixpkgs_stable_channel)
cd package && niv update
touch update-deps