go:
	./this-pylint --which-2 none --to-pylint full-data
	./full-data

graphs: plot.gp numbers
	gnuplot plot.gp

summary:
	./full-data > t.html; links -dump -width 132 t.html

plot.gp: gen-gp
	./gen-gp > plot.gp

numbers: py_treap.py splay_mod.py red_black_dict_mod.py scapegoat_mod.py binary_tree_dict_mod.py
	# This one was giving incorrect results.  Maybe that's the author's fault, maybe it's mine.
	#./this-pylint --to-pylint two_three_tree_mod.py
	./this-pylint --to-pylint py_treap.py
	# We get this in the subdir
	#./this-pylint --to-pylint red_black_dict_mod.py
	./this-pylint --ignore-message '.*Too many lines in module.*' --to-pylint avl_tree_mod.py
	./this-pylint --ignore-message '.*\.insert: Arguments number differs from overridden method.*' --to-pylint btree_mod.py
	#
	/usr/local/cpython-2.7/bin/python ./tester
	/usr/local/cpython-3.3/bin/python3 ./tester
	/usr/local/pypy-2.2/bin/pypy ./tester
	/usr/local/jython-2.7b1/bin/jython -J-Xmx$$(echo '7.5*1024' | bc | sed 's/\..*$$//')m ./tester
	#
	touch numbers

binary_tree_dict_mod.py: binary-tree-mod/binary_tree_dict_mod.m4
	(set -eu; cd binary-tree-mod; make; cp binary_tree_dict_mod.py ..)

scapegoat_mod.py: scapegoat-tree/scapegoat_mod.m4
	(set -eu; cd scapegoat-tree; make; cp scapegoat_mod.py ..)
	#m4 scapegoat-tree/scapegoat_mod.m4 > scapegoat_mod.py
	
red_black_dict_mod.py: red-black-tree-mod/red_black_tree_mod.m4
	(set -eu; cd red-black-tree-mod; make; cp red_black_dict_mod.py ..)

splay_mod.py: splay_mod.m4
	m4 splay_mod.m4 > splay_mod.py

py_treap.py: m4_treap.m4
	m4 -Dm4uniq=True m4_treap.m4 > py_treap.py

clean:
	rm -rf *.pyc splay_mod.py py_treap.py *\$$py.class __pycache__ *.pdf *.dat plot.gp red_black_dict_mod.py scapegoat_mod.py binary_tree_dict_mod.py
	cd red-black-tree-mod; make clean
	cd scapegoat-tree; make clean
	cd binary-tree-mod; make clean
	rm -f numbers
	rm -f t.html