U=http://trillian.mit.edu/~jc/music/book/DftY/1818/Button_Whitaker

all: alltunes install

alltunes: alltunes1 alltunes2
alltunes= [0-9][0-9]_*.abc
alltunes.abc: $(alltunes)
	abcjoin +CS2 $(alltunes) >alltunes.abc

# Format using jcabc2ps:
alltunes1: alltunes.abc alltunes1.ps alltunes1.pdf
alltunes1.ps: alltunes.abc fmt/alltunes1.fmt
	jcabc2ps +k4 +Ffmt/alltunes1.fmt +n +x alltunes.abc \
	|PShdr %P 'Button_Whitaker - Le Sylphe - Twenty Four Country Dances for the Year 1818' %P \
	|PSftr %D $U/ %D >alltunes1.ps
alltunes1.pdf: alltunes1.ps
	ps2pdf alltunes1.ps alltunes1.pdf

# Format using abcm2ps:
alltunes2: alltunes.abc alltunes2.ps alltunes2.pdf
alltunes2.ps: alltunes.abc fmt/alltunes2.fmt
	abcm2ps -x -j 4 -F fmt/alltunes2.fmt alltunes.abc -O tmp.ps
	PShdr <tmp.ps %P 'Button_Whitaker - Le Sylphe - Twenty Four Country Dances for the Year 1818' %P \
	|PSftr %D $U/ %D >alltunes2.ps
	rm tmp.ps
alltunes2.pdf: alltunes2.ps
	ps2pdf alltunes2.ps alltunes2.pdf

neat:         ; /bin/rm -f *- *.bak *.out
clean:    neat; /bin/rm -f *.ps *.pdf
clobber: clean; /bin/rm -f alltunes.abc

install: ../Button_Whitaker.abc ../../1818_Button_Whitaker.abc ../../../24CountryDances_1818_Button_Whitaker.abc
../Button_Whitaker.abc: alltunes.abc
	ln -f alltunes.abc ../Button_Whitaker.abc
../../1818_Button_Whitaker.abc: alltunes.abc
	ln -f alltunes.abc ../../1818_Button_Whitaker.abc
../../../24CountryDances_1818_Button_Whitaker.abc: alltunes.abc
	ln -f alltunes.abc ../../../24CountryDances_1818_Button_Whitaker.abc
