slackbuilds/Makefile

37 lines
1 KiB
Makefile
Raw Normal View History

VERSION=0.8.2
2010-08-30 19:26:30 +02:00
PREFIX=/usr/local
2010-08-30 20:12:29 +02:00
ELS=magit.el magit-svn.el magit-topgit.el
ELCS=$(ELS:.el=.elc)
2010-08-30 20:12:29 +02:00
.PHONY=install
2010-08-30 20:12:29 +02:00
%.elc: %.el
emacs --batch --eval "(add-to-list 'load-path \"$(CURDIR)\")" \
--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.el
magit-svn.elc: magit-svn.el
magit-topgit.elc: magit-topgit.el
magit.info:
install: all
mkdir -p $(DESTDIR)/$(PREFIX)/share/emacs/site-lisp
2010-08-30 20:12:29 +02:00
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:
2010-08-30 20:12:29 +02:00
rm -f magit-pkg.el magit.spec magit.info $(ELCS)