-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (52 loc) · 1.65 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
#
# Makefile for the TFT Displays package.
#
# Development by Carl J. Nobile
#
include include.mk
TODAY = $(shell date +"%Y-%m-%dT%H:%M:%S.%N%:z")
PREFIX = $(shell pwd)
PACKAGE_DIR = $(shell echo $${PWD\#\#*/})
DOCS_DIR = $(PREFIX)/docs
RM_REGEX = '(^.*.pyc$$)|(^.*.wsgic$$)|(^.*~$$)|(.*\#$$)|(^.*,cover$$)'
RM_CMD = find $(PREFIX) -regextype posix-egrep -regex $(RM_REGEX) \
-exec rm {} \;
COVERAGE_FILE = $(PREFIX)/.coveragerc
#----------------------------------------------------------------------
all : doc tar
.PHONY : rpi-tests
rpi-tests: clean
@coverage erase --rcfile=$(COVERAGE_FILE)
@export TFT_TESTING=True; \
$${VIRTUAL_ENV}/bin/coverage run --rcfile=$(COVERAGE_FILE) \
$${VIRTUAL_ENV}/bin/nosetests
@coverage report --rcfile=$(COVERAGE_FILE)
@echo $(TODAY)
.PHONY : rpi-html
rpi-html:
@rm -rf $(DOCS_DIR)/htmlcov
@coverage html --rcfile=$(COVERAGE_FILE)
.PHONY : sphinx
sphinx : clean
@(cd $(DOCS_DIR); make html)
#----------------------------------------------------------------------
.PHONY : doc
doc :
@(cd $(DOCS_DIR); make)
#----------------------------------------------------------------------
.PHONY : tar
tar : clean
@(cd ..; tar -czvf ${PACKAGE_DIR}-${VERSION}.tar.gz --exclude=".git" \
${PACKAGE_DIR})
#----------------------------------------------------------------------
.PHONY : python-api
python-api:
@python setup.py build
#----------------------------------------------------------------------
.PHONY : clean
clean :
@$(shell $(RM_CMD))
@(cd ${DOCS_DIR}; make clean)
.PHONY : clobber
clobber : clean
@rm -rf build dist ${PACKAGE_DIR}.egg-info __pycache__