forked from codespell-project/codespell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 1.43 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
prefix ?= /usr/local
bindir ?= ${prefix}/bin
datadir ?= ${prefix}/share/codespell
_VERSION := $(shell grep -e "VERSION = '[0-9]\.[0-9]" codespell.py | cut -f 3 -d ' ')
VERSION = $(subst ',,$(_VERSION))
PHONY = all check install git-tag-release
all: codespell
codespell: codespell.py
sed "s|^default_dictionary = .*|default_dictionary = '${datadir}/dictionary.txt'|" < $^ > $@
check:
test f66431c66b437c78523bc07b872b9a7b = $$(./codespell.py example/ | md5sum | cut -f1 -d\ )
install: codespell
install -d ${DESTDIR}${datadir} ${DESTDIR}${bindir}
install -m644 -t ${DESTDIR}${datadir} data/dictionary.txt data/linux-kernel.exclude
install -m755 -T codespell ${DESTDIR}${bindir}/codespell
git-tag-release:
git commit -a -m "codespell $(VERSION)"
git tag -m "codespell $(VERSION)" -s v$(VERSION)
git gc --prune=0
codespell-$(VERSION).tar.xz.asc: codespell-$(VERSION).tar.xz
gpg --armor --detach-sign --output $@ $^
codespell-$(VERSION).tar.xz:
git archive --format=tar --prefix codespell-$(VERSION)/ v$(VERSION) | xz > $@
tar-sync: codespell-$(VERSION).tar.xz codespell-$(VERSION).tar.xz.asc
github-release release --repo codespell --tag v$(VERSION) --name v$(VERSION)
github-release upload --repo codespell --tag v$(VERSION) \
--name codespell-$(VERSION).tar.xz \
--file codespell-$(VERSION).tar.xz
github-release upload --repo codespell --tag v$(VERSION) \
--name codespell-$(VERSION).tar.xz.asc \
--file codespell-$(VERSION).tar.xz.asc