-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (27 loc) · 885 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
# If (the right) Emacs isn't in your path, define the variable EMACS_EXE
# in localvars.mk. e.g.
# EMACS_EXE="/Applications/Emacs.app/Contents/MacOS/Emacs"
-include localvars.mk
ifndef EMACS_EXE
EMACS_EXE=`which emacs`
endif
ELPA=./docs/elpa
ORGS := $(wildcard *.org)
%.el: %.org
$(EMACS_EXE) --batch --visit $< \
--eval "(progn (require 'ob) (org-babel-tangle nil \"$@\"))"
%.published: %.el
$(EMACS_EXE) --batch \
--eval "(progn (require 'package-x) (setq package-archive-upload-base (expand-file-name \"$(ELPA)\")) (package-upload-file \"$<\"))";
touch $@
all: tooclean publish
publish: $(ORGS:.org=.published)
clean:
rm -f *.el
rm -f *.published
# "Too" clean because it deletes the contents of docs/elpa, which are
# generated from tangle but checked in to be visible to Github Pages
tooclean:
rm -f *.el
rm -f *.published
rm -rf $(ELPA)/*