# Top level makefile for convenience.  All the details are in the .makefiles
# directory.  Run the following for a list of commands
#
# make help

makefiles_dir = .makefiles
include .makefiles/rst2html.mk

_tmp:
	mkdir _tmp

_tmp/python_test_output.txt: _tmp *.py
	python Schroedinger_3D.py --test > $@

_tmp/python_benchmark_output.txt: _tmp *.py
	python -m cProfile -o _tmp/Schroedinger_3D.prof \
                              Schroedinger_3D.py --benchmark > $@

.PHONY: test, benchmark
test: _tmp/python_test_output.txt
	diff _tmp/python_test_output.txt python_test_output.txt
	nosetests nuclei_ode.py tests --verbosity=3 \
	          --with-doctest --doctest-tests \
	          --doctest-options="+ELLIPSIS,+NORMALIZE_WHITESPACE" \
	          --with-coverage --cover-package=nuclei_ode --cover-html

benchmark: _tmp/python_benchmark_output.txt
	diff _tmp/python_benchmark_output.txt python_benchmark_output.txt

# 	nosetests superfluid --verbosity=3 \
# 	          --with-doctest --doctest-tests \
# 	          --doctest-options="+ELLIPSIS,+NORMALIZE_WHITESPACE" \
# 	          -e examples

# test_pdb:
# 	nosetests superfluid --verbosity=3 \
# 	          --with-doctest --doctest-tests \
# 	          --doctest-options="+ELLIPSIS,+NORMALIZE_WHITESPACE" \
# 	          --pdb --pdb-failure \
# 	          -e examples
