Skip to content

Commit

Permalink
Lisätään Makefile, jolla voi mm. tehdä tar-paketteja
Browse files Browse the repository at this point in the history
  • Loading branch information
tlikonen committed Apr 14, 2013
1 parent be0f0df commit 732cbfd
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Makefile
@@ -0,0 +1,32 @@
# Makefile for suomalainen-kalenteri

BASE := suomalainen-kalenteri
DESC := Finnish national and Christian holidays for calendar
VERSION := $(shell date +%Y.%-m.%-d)
MAIN := $(BASE).el
PKG := $(BASE)-pkg.el
LOADER := loader.el
FILES := $(MAIN) $(PKG) $(LOADER) README.org
NAME := $(BASE)-$(VERSION)

elpa: $(PKG) $(LOADER)
tar --create --file $(NAME).tar --transform 's,^,$(NAME)/,' $(FILES)
gpg --yes --detach-sign $(NAME).tar

$(PKG):
@printf '(define-package "%s" "%s"\n "%s" nil)\n' \
"$(BASE)" "$(VERSION)" "$(DESC)" >$@
@cat $@

$(LOADER):
@printf ";;;###autoload\n(eval-after-load 'calendar\n" >$@
@printf " '(load \"$(MAIN)\" t t))\n" >>$@
@cat $@

tag:
git tag -s $(VERSION) -m 'Version $(VERSION)' HEAD

clean:
rm -f -- $(PKG) *.sig *.tar $(LOADER)

.PHONY: elpa tag clean

0 comments on commit 732cbfd

Please sign in to comment.