forked from jrblevin/deft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (23 loc) · 720 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
EMACS=emacs
PACKAGE=deft
SOURCE=deft.el
COMPILED=deft.elc
VERSION=$(shell cat $(SOURCE) | sed -n 's/^;;; Version: \(.*\)/\1/p')
.el.elc:
$(EMACS) -q -no-site-file -no-init-file -batch -f batch-byte-compile $<
all: $(COMPILED) README.md
.PHONY: dist
README.md: $(SOURCE) readme.sh
./readme.sh
dist:
DIR=$$(mktemp -d -t "$(PACKAGE)"); \
DESTDIR="$$DIR/$(PACKAGE)-$(VERSION)"; \
mkdir -p $$DESTDIR; \
cp -a $(SOURCE) README.md $$DESTDIR; \
tar zcf $(CURDIR)/$(PACKAGE)-$(VERSION).tar.gz -C $$DIR "$(PACKAGE)-$(VERSION)"; \
rm -r $$DIR; \
echo "$(PACKAGE)-$(VERSION).tar.gz has been created"
update: $(COMPILED)
cp -a $(SOURCE) $(COMPILED) $(HOME)/.emacs.d/site-lisp
clean:
rm -f $(COMPILED) index.text