-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (48 loc) · 1.36 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
# Dinghy setup
PACKAGE_MARKER=$(HOME)/.emacs.d/elpa/whale-line/whale-line.el
PACKAGE_NAME=wal-emacs
CURRENT_PACKAGE_VERSION=2.4.6
LOCAL_DEPS=build
LOCAL_PHONY_DEPS=ensure-init $(PACKAGE_MARKER)
CI_DEPS=build
PACIFY_DEPS=build
UPDATE_VERSION_FILES=lib/wal-config.org wal.el Makefile
CHANGELOG_FILE=CHANGELOG.1.md
include dinghy/emacs-package.mk
# Goals
WITH_PRELUDE=$(EMACS) --batch -l ./wal.el
EMACS_INIT_FILE?=$(HOME)/.emacs.d/init.el
INIT_CLEAR=nil
INIT=--eval "(wal-init \"$(EMACS_INIT_FILE)\" \"$(CURDIR)\" $(INIT_CLEAR))"
BOOTSTRAP_MODE=plain
BOOTSTRAP=--eval "(wal-bootstrap \"$(CURDIR)\" '$(BOOTSTRAP_MODE))"
.PHONY: tangle ensure-init force-ensure uninstall \
update-git update upgrade cold-boot
## Installation
build:
$(WITH_PRELUDE) $(BOOTSTRAP)
tangle: clean
$(WITH_PRELUDE) $(BOOTSTRAP)
ensure-init:
$(WITH_PRELUDE) $(INIT)
force-ensure: BOOTSTRAP_MODE=ensure
force-ensure:
$(WITH_PRELUDE) $(BOOTSTRAP)
$(PACKAGE_MARKER): BOOTSTRAP_MODE=ensure
$(PACKAGE_MARKER):
$(WITH_PRELUDE) $(BOOTSTRAP)
uninstall: INIT_CLEAR=t
uninstall:
$(WITH_PRELUDE) $(INIT)
## Updating
update-git:
$(info Pulling changes)
git pull --recurse-submodules
update: update-git clean ensure-init $(PACKAGE_MARKER)
upgrade: BOOTSTRAP_MODE=upgrade
upgrade:
$(WITH_PRELUDE) $(BOOTSTRAP) -f wal-upgrade
## Checks
cold-boot: BOOTSTRAP_MODE=cold
cold-boot:
$(WITH_PRELUDE) $(BOOTSTRAP)