File: Makefile

package info (click to toggle)
markdown-mode 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,112 kB
  • sloc: lisp: 13,840; makefile: 72; sh: 16
file content (40 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (2)
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