aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 345dcf0c6d270a763f363b7942b2847348546035 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.POSIX:

EMACS   = emacs
# Rely on EMACSLOADPATH for everything but the current directory.
BATCH   = $(EMACS) --batch -Q -L . -L tests

EL = piem.el piem-b4.el piem-debbugs.el piem-elfeed.el piem-eww.el	\
     piem-gnus.el piem-lei.el piem-maildir.el piem-notmuch.el		\
     piem-rmail.el tests/piem-lei-tests.el tests/piem-rmail-tests.el	\
     tests/piem-tests.el
ELC = $(EL:.el=.elc)

all: compile Documentation/piem.info piem-autoloads.el

compile: $(ELC)

check: test
test: $(ELC)
	$(BATCH) -l tests/piem-tests.elc -f ert-run-tests-batch

piem-autoloads.el: $(EL)
	$(BATCH) -l package --eval \
	  '(package-generate-autoloads "piem" default-directory)'

clean:
	rm -f Documentation/piem.info Documentation/piem.html piem-autoloads.el
	rm -f $(ELC)
	rm -rf html/

docs: Documentation/piem.html Documentation/piem.info
	rm -rf Documentation/html/
	makeinfo --html --css-ref=../manual.css -o Documentation/html/ \
		-c TOP_NODE_UP_URL=/ Documentation/piem.texi

piem-b4.elc: piem-b4.el piem.elc
piem-elfeed.elc: piem-elfeed.el piem.elc
piem-debbugs.elc: piem-debbugs.el piem.elc
piem-eww.elc: piem-eww.el piem.elc
piem-gnus.elc: piem-gnus.el piem.elc
piem-lei.elc: piem-lei.el piem.elc
piem-maildir.elc: piem-maildir.el
piem-notmuch.elc: piem-notmuch.el piem.elc
piem-rmail.elc: piem-rmail.el piem.elc
piem.elc: piem.el piem-maildir.elc
tests/piem-lei-tests.elc: tests/piem-lei-tests.el piem-lei.elc
tests/piem-rmail-tests.elc: tests/piem-rmail-tests.el piem-rmail.elc
tests/piem-tests.elc: tests/piem-tests.el piem.elc

.SUFFIXES: .el .elc .texi .info .html

.el.elc:
	$(BATCH) -f batch-byte-compile $<

.texi.info:
	makeinfo -o $@ $<

.texi.html:
	makeinfo --html --css-ref=manual.css -c TOP_NODE_UP_URL=/ --no-split \
		-o $@  $<

sign-tar:
	tag="$$(git describe --abbrev=0)"; \
	object=$$(git archive --format tar \
		    --prefix "piem-$${tag#v}/" "$$tag" | \
		  gpg --output - --armor --detach-sign | \
		  git hash-object -w --stdin); \
	git notes --ref=refs/notes/signatures/tar add -C "$$object" "$$tag"