-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
52 lines (43 loc) · 1.77 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
all:
@echo "choose a valid target"
.PHONY: release
release:
@echo "Setting up cmake (release)"
@python ./cmake/print_cmake_command.py Release
[ -d release ] || (mkdir release && cd release && eval `python ../cmake/print_cmake_command.py Release`)
.PHONY: relwithdebinfo
relwithdebinfo:
@echo "Setting up cmake (relwithdebinfo)"
@python ./cmake/print_cmake_command.py RelWithDebInfo
[ -d relwithdebinfo ] || (mkdir relwithdebinfo && cd relwithdebinfo && eval `python ../cmake/print_cmake_command.py RelWithDebInfo`)
.PHONY: debug
debug:
@echo "Setting up cmake (debug)"
@python ./cmake/print_cmake_command.py Debug
[ -d debug ] || (mkdir debug && cd debug && eval `python ../cmake/print_cmake_command.py Debug`)
CPU_COUNT=$(shell python -c 'import multiprocessing as m; print m.cpu_count()')
.PHONY: test
test:
(cd test && NOSE_PROCESSES=$(CPU_COUNT) NOSE_PROCESS_TIMEOUT=240 nosetests -a '!uses_mp' --verbose)
(cd test && nosetests -a 'uses_mp' --verbose)
.PHONY: travis_install
travis_install:
make relwithdebinfo
(cd relwithdebinfo && make && make install)
pip install .
.PHONY: travis_script
travis_script:
(cd relwithdebinfo && CTEST_OUTPUT_ON_FAILURE=true make test)
(cd test && NOSE_PROCESSES=$(CPU_COUNT) NOSE_PROCESS_TIMEOUT=240 nosetests --verbose -a '!uses_mp,!slow')
(cd test && nosetests --verbose -a 'uses_mp,!slow')
.PHONY: lint
lint:
pyflakes microscopes test setup.py
pep8 --filename=*.py --ignore=E265 microscopes test setup.py
pep8 --filename=*.pyx --ignore=E265,E211,E225 microscopes
.PHONY: clean
clean:
rm -rf release relwithdebinfo debug microscopes_irm.egg-info
find microscopes/ -name '*.cpp' -type f -print0 | xargs -0 rm --
find microscopes/ -name '*.so' -type f -print0 | xargs -0 rm --
find microscopes/ -name '*.pyc' -type f -print0 | xargs -0 rm --