-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
89 lines (72 loc) · 2.83 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
EMACS ?= emacs
.PHONY: tests
tests:
$(EMACS) -Q -batch -l ert -l tests/load-path.el -l tests/tests.el -f ert-run-tests-batch-and-exit
.PHONY: iter-tests
iter-tests:
$(EMACS) -Q -batch -l ert -l tests/load-path.el -l tests/iter-tests.el -f ert-run-tests-batch-and-exit
.PHONY: pcase-tests
pcase-tests:
$(EMACS) -Q -batch -l ert -l tests/load-path.el -l tests/pcase-tests.el -f ert-run-tests-batch-and-exit
.PHONY: seq-tests
seq-tests:
$(EMACS) -Q -batch -l ert -l tests/load-path.el -l tests/seq-tests.el -f ert-run-tests-batch-and-exit
.PHONY: misc-tests
misc-tests:
$(EMACS) -Q -batch -l ert -l tests/load-path.el -l tests/misc-tests.el -f ert-run-tests-batch-and-exit
.PHONY: all-tests
all-tests:
$(EMACS) -Q -batch \
-l ert \
-l tests/load-path.el \
-l tests/tests.el \
-l tests/pcase-tests.el \
-l tests/seq-tests.el \
-l tests/iter-tests.el \
-l tests/misc-tests.el \
-f ert-run-tests-batch-and-exit
.PHONY: info
info:
@echo Making Info file from Texinfo file
makeinfo --verbose --output=doc/loopy.info doc/loopy.texi
test -f doc/loopy.info
@echo Making Info dir file using Loopy Info file
install-info --debug --dir-file doc/dir --info-file doc/loopy.info
test -f doc/dir
.PHONY: tar
# Create Tar file for `package-install-file'
tar: info
@echo Getting package version if not passed explicitly
$(eval VERSION ?= $(shell $(EMACS) -Q -batch --eval="(progn (require 'lisp-mnt) (with-temp-buffer (insert-file-contents \"lisp/loopy.el\") (princ (or (lm-header \"package-version\") (lm-header \"version\")))))"))
@echo Package version is $(VERSION)
@echo ""
@echo "Making directory to hold package files"
mkdir --verbose "loopy-$(VERSION)"
cp --verbose --target-directory="loopy-$(VERSION)" lisp/*.el
cp --verbose --target-directory="loopy-$(VERSION)" doc/dir doc/loopy.info
@echo ""
@echo "Creating \"loopy-pkg.el\""
$(EMACS) -Q -batch --eval=" \
(with-temp-buffer \
(require 'lisp-mnt) \
(insert-file-contents \"./lisp/loopy.el\") \
(let ((name (lm-get-package-name)) \
(version (lm-version)) \
(deps (lm-header \"Package-Requires\")) \
(desc (lm-summary)) \
(keywords (lm-keywords))) \
(with-temp-buffer \
(insert \"(define-package \") \
(insert \"\\\"\" (file-name-base name) \"\\\" \") \
(insert (format \"%S\" version)) \
(insert \" \") \
(insert (format \"%S\" desc)) \
(insert \" \") \
(insert \"'\" (format \"%s\" deps)) \
(insert \")\") \
(write-file \"./loopy-$(VERSION)/loopy-pkg.el\"))))"
@echo Making Tar file from that directory
tar --create --file "loopy-$(VERSION).tar" --exclude-from=".elpaignore" --verbose "loopy-$(VERSION)"
@echo Deleting that directory
rm --verbose loopy-$(VERSION)/*
rmdir --verbose loopy-$(VERSION)