-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
54 lines (41 loc) · 1.08 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
PYTHON ?= python
VERSION = $(shell cat VERSION)
TAGVER = $(shell cat VERSION | sed -e "s/\([0-9\.]*\).*/\1/")
ifeq ($(VERSION), $(TAGVER))
TAG = $(TAGVER)
else
TAG = "HEAD"
endif
ifndef PREFIX
PREFIX = "/usr"
endif
all: tmpls
$(PYTHON) setup.py build
tmpls:
cd spectacle/spec; $(MAKE)
cd spectacle/dsc; $(MAKE)
tag:
git tag $(VERSION)
dist-bz2:
git archive --format=tar --prefix=spectacle-$(VERSION)/ $(TAG) | \
bzip2 > spectacle-$(VERSION).tar.bz2
dist-gz:
git archive --format=tar --prefix=spectacle-$(VERSION)/ $(TAG) | \
gzip > spectacle-$(VERSION).tar.gz
doc:
markdown README.md > README.html
test:
cd tests/; $(PYTHON) alltest.py
install: all install-data
$(PYTHON) setup.py install --root=${DESTDIR} --prefix=${PREFIX}
develop: all install-data
$(PYTHON) setup.py develop
install-data:
install -d ${DESTDIR}/usr/share/spectacle/
install -m 644 data/*csv ${DESTDIR}/usr/share/spectacle/
install -m 644 data/GROUPS ${DESTDIR}/usr/share/spectacle/
clean:
rm -rf build/
rm -f README.html */*~ */*/*~
cd spectacle/spec; $(MAKE) clean
cd spectacle/dsc; $(MAKE) clean