-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (31 loc) · 1.26 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
.PHONY: all clean install
ARCHIVE_NAME:=flymake-csslint
VERSION:=$(shell emacs --batch --eval "(with-temp-buffer \
(require 'package)\
(insert-file \"$(ARCHIVE_NAME).el\")\
(princ (aref (package-buffer-info) 3)))")
PACKAGE_NAME:=$(ARCHIVE_NAME)-$(VERSION)
all: $(PACKAGE_NAME).tar
$(ARCHIVE_NAME).info: README.md
pandoc -t texinfo $^ | makeinfo -o $@
README: README.md
pandoc --atx-headers -t plain -o $@ $^
# requires package-build.el from https://github.com/milkypostman/melpa
# to be available in your emacs load-path
$(ARCHIVE_NAME)-pkg.el: $(ARCHIVE_NAME).el
emacs --batch --user `whoami` --eval "(progn \
(require 'package-build) \
(pb/write-pkg-file \
\"$(ARCHIVE_NAME)-pkg.el\" \
(with-temp-buffer \
(insert-file \"$(ARCHIVE_NAME).el\") \
(package-buffer-info))))"
# create a tar ball in package.el format for uploading to http://marmalade-repo.org
$(PACKAGE_NAME).tar: README $(ARCHIVE_NAME).el $(ARCHIVE_NAME)-pkg.el $(ARCHIVE_NAME).info dir
tar -c -s "@^@$(PACKAGE_NAME)/@" -f $(PACKAGE_NAME).tar $^
install: $(PACKAGE_NAME).tar
emacs --batch --user `whoami` --eval "(progn \
(package-initialize)\
(package-install-file \"`pwd`/$(PACKAGE_NAME).tar\"))"
clean:
$(RM) $(ARCHIVE_NAME)-*.tar $(ARCHIVE_NAME)-pkg.el README $(ARCHIVE_NAME).info