forked from trebb/bbdb-vcard
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
48 lines (36 loc) · 1.17 KB
/
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
41
42
43
44
45
46
47
48
PREFIX ?= /usr/local
datarootdir ?= $(PREFIX)/share
lispdir ?= $(datarootdir)/emacs/site-lisp/bbdb-vcard
infodir ?= $(datarootdir)/info
docdir ?= $(datarootdir)/doc/bbdb-vcard
execdir ?= $(PREFIX)/bin
ELS = bbdb-vcard.el vcard.el
ELCS = $(ELS:.el=.elc)
CP ?= install -p -m 644
CPBIN ?= install -p -m 755
MKDIR ?= install -p -m 755 -d
RMDIR ?= rm -rf
MAKEINFO ?= makeinfo
INSTALL_INFO ?= install-info
EMACS ?= $(shell which emacs)
BATCH = $(EMACS) $(EFLAGS) -batch -L .
BATCHC = $(BATCH) -f batch-byte-compile
all: $(ELCS) bbdb-vcard.info
%.elc: %.el
@$(BATCHC) $<
bbdb-vcard.info: bbdb-vcard.texi
$(MAKEINFO) $< -o $@
install: all install-lisp install-docs
install-lisp: $(ELCS)
$(MKDIR) $(DESTDIR)$(lispdir)
$(CP) $(ELS) $(ELCS) $(DESTDIR)$(lispdir)
install-docs: bbdb-vcard.info
$(MKDIR) $(DESTDIR)$(infodir)
$(CP) $< $(DESTDIR)$(infodir)
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$<
$(MKDIR) $(DESTDIR)$(docdir)
$(CP) COPYING README.md $(DESTDIR)$(docdir)
test: $(ELCS) bbdb-vcard-tests.el
$(BATCH) -q -l bbdb -l bbdb-vcard -l bbdb-vcard-tests.el --execute '(ert-run-tests-batch-and-exit t)'
clean:
rm -f *.elc bbdb-vcard.info