-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (58 loc) · 1.49 KB
/
Copy pathMakefile
File metadata and controls
73 lines (58 loc) · 1.49 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-include .config.mk
PKG = emir
ELS = $(PKG).el
ELS += emir-gelpa.el
ELS += emir-melpa.el
ELS += emir-utils.el
ELCS = $(ELS:.el=.elc)
DEPS = borg
DEPS += closql
DEPS += compat
DEPS += cond-let
DEPS += elx
DEPS += emacsql
DEPS += epkg/lisp
DEPS += ghub/lisp
DEPS += llama
DEPS += magit/lisp
DEPS += package-build
DEPS += transient/lisp
DEPS += treepy
DEPS += with-editor/lisp
LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
LOAD_PATH += -L .
EMACS ?= emacs
EMACS_ARGS ?=
EMACS_Q_ARG ?= -Q
EMACS_BATCH ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(LOAD_PATH)
all: lisp
help:
$(info make all -- Build lisp)
$(info make lisp -- Build lisp)
$(info make redo -- Build lisp from scratch)
$(info make clean -- Remove built files)
@printf "\n"
redo: clean lisp
lisp: $(ELCS) autoloads check-declare
autoloads: $(PKG)-autoloads.el
%.elc: %.el
@printf "Compiling $<\n"
@$(EMACS_BATCH) --funcall batch-byte-compile $<
check-declare:
@printf " Checking function declarations\n"
@$(EMACS_BATCH) --eval "(check-declare-directory default-directory)"
CLEAN = $(ELCS) $(PKG)-autoloads.el
clean:
@printf " Cleaning...\n"
@rm -rf $(CLEAN)
$(PKG)-autoloads.el: $(ELS)
@printf " Creating $@\n"
@$(EMACS_BATCH) --eval "\
(let ((inhibit-message t))\
(loaddefs-generate\
default-directory \"$@\" nil\
(prin1-to-string\
'(add-to-list 'load-path\
(or (and #$$ (directory-file-name (file-name-directory #$$)))\
(car load-path)))))\
nil t)"