Skip to content

Commit

Permalink
Import Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jrblevin committed Jul 15, 2017
1 parent 59173ba commit 86825cd
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
EMACS=emacs

PACKAGE=deft

SOURCE=deft.el
COMPILED=deft.elc

VERSION=$(shell cat $(SOURCE) | sed -n 's/^;;; Version: \(.*\)/\1/p')

.el.elc:
$(EMACS) -q -no-site-file -no-init-file -batch -f batch-byte-compile $<

all: $(COMPILED) README.md

.PHONY: dist

README.md: $(SOURCE) readme.sh
./readme.sh

dist:
DIR=$$(mktemp -d -t "$(PACKAGE)"); \
DESTDIR="$$DIR/$(PACKAGE)-$(VERSION)"; \
mkdir -p $$DESTDIR; \
cp -a $(SOURCE) README.md $$DESTDIR; \
tar zcf $(CURDIR)/$(PACKAGE)-$(VERSION).tar.gz -C $$DIR "$(PACKAGE)-$(VERSION)"; \
rm -r $$DIR; \
echo "$(PACKAGE)-$(VERSION).tar.gz has been created"

update: $(COMPILED)
cp -a $(SOURCE) $(COMPILED) $(HOME)/.emacs.d/site-lisp

clean:
rm -f $(COMPILED) index.text

0 comments on commit 86825cd

Please sign in to comment.