# festival doesn't sound as good as flite, and also a bunch of festival segfaults showed up in my logs right before a
# system crash once.
# debs=festvox-us2 mbrola-us2 festlex-cmu festlex-poslex mplayer
debs=flite lame mpg123

# untested
rpms=${debs}
# It seems like homebrew doesn't have flite or festival, 2021-10-18.  I built flite manually.
brew_packages=mpg123

directory:=$(shell pwd)

go:
	/usr/local/cpython-3.11/bin/mypy --disallow-untyped-calls countdown speak.py
	./this-pylint \
		--which-2 None \
		--which-3 /usr/local/cpython-3.11/bin/pylint \
		--to-pylint countdown speak.py
	cd /mymount/sound/Phone-Music/Rush/'1973-Not Fade Away' && ${directory}/countdown --period 0 --count 0 --nfiles 2 --specific 'Not Fade Away.mp3'
	./countdown --period 4 --count 8 --specific /mymount/sound/Phone-Music/Rush/'1973-Not Fade Away'/*.mp3

clean:
	rm -f *.pyc
	rm -f countdown.py
	rm -rf .mypy_cache

install:
	./install-file --file countdown --directory /usr/local/bin/.
	./install-file --file not-music --directory /usr/local/bin/.
	./install-file --file speak.py --directory /usr/local/lib/.
	./install-package --deb-packages "${debs}" --rpm-packages "${rpms}" --brew-packages "${brew_packages}"