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