-
Notifications
You must be signed in to change notification settings - Fork 29
/
GNUmakefile
51 lines (35 loc) · 996 Bytes
/
GNUmakefile
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
PYTHON?= python3
TWINE?= twine
GPG?= gpg2
GPGSIGNKEY?= 0xE1520675375F5E35
VERSION:=$(shell $(PYTHON) -c 'import acefile; print(acefile.__version__)')
SDIST= dist/acefile-$(VERSION).tar.gz
SDISTSIG= $(SDIST:=.asc)
APIDOC= apidoc-acefile-$(VERSION).tar.bz2
all: test dist sign apidoc
apidoc:
$(MAKE) -C apidoc all
tar -c -v -y -f $(APIDOC) -C apidoc/_build/html _static index.html
dist: $(SDIST)
$(SDIST):
$(PYTHON) setup.py sdist
sign: $(SDISTSIG)
$(SDISTSIG): $(SDIST)
$(GPG) -u $(GPGSIGNKEY) --detach-sign -a $(SDIST)
upload: $(SDISTSIG)
$(TWINE) upload $(SDIST) $(SDISTSIG)
doctest:
$(PYTHON) acefile.py --doctest
test:
$(PYTHON) setup.py test
build:
$(PYTHON) setup.py build_ext --inplace
clean:
$(MAKE) -C apidoc clean
rm -rf apidoc-acefile-*.tar.bz2
find . -depth -name '__pycache__' -type d -exec rm -r '{}' \;
rm -rf acefile.egg-info
rm -rf build *.so
todo:
egrep -r 'XXX|TODO|FIXME' *.py
.PHONY: all apidoc dist sign upload doctest test build clean todo