forked from magit/magit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.39 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
VERSION=1.0.0
EMACS=emacs
PREFIX=/usr/local
ELS=magit.el magit-svn.el magit-topgit.el magit-key-mode.el magit-bisect.el
ELCS=$(ELS:.el=.elc)
DIST_FILES=$(ELS) Makefile magit.texi README.md magit.spec.in magit-pkg.el.in 50magit.el
.PHONY=install
BATCH=$(EMACS) -batch -q -no-site-file -eval \
"(setq load-path (cons (expand-file-name \".\") load-path))"
%.elc: %.el
$(BATCH) --eval '(byte-compile-file "$<")'
all: $(ELCS) magit.info magit.spec magit-pkg.el
magit.spec: magit.spec.in
sed -e s/@VERSION@/$(VERSION)/ < $< > $@
magit-pkg.el: magit-pkg.el.in
sed -e s/@VERSION@/$(VERSION)/ < $< > $@
magit.elc:
magit-key-mode.elc:
magit-svn.elc:
magit-topgit.elc:
magit.info:
# yuck - this needs cleaning up a bit...
dist: $(DIST_FILES)
mkdir -p magit-$(VERSION)
cp $(DIST_FILES) magit-$(VERSION)
tar -cvzf magit-$(VERSION).tar.gz magit-$(VERSION)
rm -rf magit-$(VERSION)
install: all
mkdir -p $(DESTDIR)/$(PREFIX)/share/emacs/site-lisp
install -m 644 $(ELS) $(ELCS) $(DESTDIR)/$(PREFIX)/share/emacs/site-lisp
mkdir -p $(DESTDIR)/$(PREFIX)/share/info
install -m 644 magit.info $(DESTDIR)/$(PREFIX)/share/info
install-info --info-dir=$(DESTDIR)/$(PREFIX)/share/info $(DESTDIR)/$(PREFIX)/share/info/magit.info
mkdir -p $(DESTDIR)/etc/emacs/site-start.d
install -m 644 50magit.el $(DESTDIR)/etc/emacs/site-start.d/50magit.el
clean:
rm -fr magit-pkg.el magit.spec magit.info $(ELCS) *.tar.gz magit-$(VERSION)