U=http://trillian.mit.edu/~jc/music/book/DftY/1810/Button_Whitaker_Elegant

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 +Ffmt/alltunes1.fmt +x alltunes.abc \
	|PShdr %P 'Button_Whitaker - Twelve Elegant New Dances for the Year 1810' %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 -F fmt/alltunes2.fmt alltunes.abc -O tmp.ps
	PShdr <tmp.ps %P 'Button & Whitaker - Twelve Elegant New Dances for the Year 1810' %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_Elegant.abc ../../1810_Button_Whitaker_Elegant.abc ../../../24CountryDances_1810_Button_Whitaker_Elegant.abc
../Button_Whitaker_Elegant.abc: alltunes.abc
	ln -f alltunes.abc ../Button_Whitaker_Elegant.abc
../../1810_Button_Whitaker_Elegant.abc: alltunes.abc
	ln -f alltunes.abc ../../1810_Button_Whitaker_Elegant.abc
../../../24CountryDances_1810_Button_Whitaker_Elegant.abc: alltunes.abc
	ln -f alltunes.abc ../../../24CountryDances_1810_Button_Whitaker_Elegant.abc
