-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
98 lines (78 loc) · 2.35 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
90
91
92
93
94
95
96
97
98
PYTHON = python
top_srcdir = src
COVERAGE_MODULES = feat
TOOLS = tools
TRIAL = ${TOOLS}/flumotion-trial
PEP8 = ${TOOLS}/pep8.py --repeat
SHOW_COVERAGE = ${TOOLS}/show-coverage.py
GIT_REVISION = $(shell git describe || echo 'unknown')
check-local: check-tests check-local-pep8
check-local-pep8:
find $(top_srcdir) -name \*.py | grep -v extern | \
sort -u | xargs $(PYTHON) $(PEP8)
pyflakes:
find $(top_srcdir) -name \*.py | grep -v extern | \
sort -u | xargs pyflakes
pychecker:
find $(top_srcdir) -name \*.py | grep -v extern | \
sort -u | xargs pychecker
check-tests:
$(PYTHON) $(TRIAL) $(TRIAL_FLAGS) $(COVERAGE_MODULES)
check-tests-fast:
@make check-tests \
TRIAL_FLAGS="--skip-slow"
check-doc: doc/reference/html/index.html
check-zip:
-make check-tests FEAT_DEBUG=4 > test.out 2>&1
-rm -r check
mkdir -p check
-mv test.out check
-mv _trial_temp check
-mv test.log check
git describe > check/feat.gitversion
zip -r check-$(GIT_REVISION).zip check
doc/reference/html/index.html: Makefile src
epydoc feat -o doc/reference/html -v --fail-on-warning | $(PYTHON) common/epyfilter.py common/efc.py
docs:
@-rm doc/reference/html/index.html
make doc/reference/html/index.html
coverage:
@test ! -z "$(COVERAGE_MODULES)" || \
(echo Define COVERAGE_MODULES in your Makefile; exit 1)
rm -f feat-saved-coverage.pickle
$(PYTHON) $(TRIAL) --temp-directory=_trial_coverage --coverage --saved-coverage=feat-saved-coverage.pickle $(COVERAGE_MODULES)
make show-coverage
show-coverage:
@test ! -z "$(COVERAGE_MODULES)" || \
(echo Define COVERAGE_MODULES in your Makefile; exit 1)
@keep=""; \
for m in $(COVERAGE_MODULES); do \
echo adding $$m; \
keep="$$keep `ls _trial_coverage/coverage/$$m*`"; \
done; \
$(PYTHON) $(SHOW_COVERAGE) $$keep
check-fast:
@make check-commit \
TRIAL_FLAGS="--skip-slow"
check-commit:
current=`pwd`; \
repo=`pwd`; \
reponame=`basename $$current`; \
dst=/tmp/$$reponame; \
if test -d $$dst; then \
(echo Removing old $$dst; rm -rf $$dst); \
fi; \
cd /tmp; \
git clone --recursive --depth 0 $$repo; \
cd $$reponame; \
make check-local; \
cd $$current; \
rm -rf $$dst;
targz:
python setup.py sdist
mv dist/feat-*.tar.gz .
rpm: el6
el6: targz
mach -k -r c6l64 build feat.spec
upload-pip:
python setup.py sdist upload