-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
44 lines (33 loc) · 936 Bytes
/
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
# Emacs invocation
# Don't load an init file: -q
# Avoid processing X resources: -Q
# Send messages to stderr: --batch
EMACS = emacs -Q -q --batch
# Remove command
RM = rm
# Additional emacs load-path and autoload
LOAD_PATH := -L .
LOAD_AUTOLOAD := -l autoload
# Define Compile Command (COMPILE)
# Call batch-byte-compile function: -f
COMPILE := -f batch-byte-compile
# AUTOLOAD related variables
AUTOLOAD_DIR := "${PWD}"
AUTOLOAD_FILE := "${PWD}/ob-elixir-autoloads.el"
AUTOLOAD_EVAL := --eval '(make-directory-autoloads ${AUTOLOAD_DIR} ${AUTOLOAD_FILE})'
# Expand the source code files
EL != ls *.el
# Compiled files
ELC := $(EL:.el=.elc)
# Entry Point
all: compile autoload
# Compile needed files
compile: $(ELC)
# Translate pure Elisp (.el) to byte compile (.elc)
$(ELC): $(EL)
${EMACS} ${LOAD_PATH} ${COMPILE} ${.ALLSRC}
autoload:
${EMACS} ${LOAD_AUTOLOAD} ${AUTOLOAD_EVAL}
# Remove {}.elc files
clean:
${RM} ${ELC}