U=http://trillian.mit.edu/~jc/music/book/24CountryDances/1779/Thompson/
a2p=jcabc2ps

all: alltunes install

alltunes= [0-9A-Z][0-9A-Z][0-9a-z]_*.abc
alltunes: alltunes.abc alltunes.ps alltunes.pdf
alltunes.abc: $(alltunes)
	abcjoin +CS2 $(alltunes) >alltunes.abc
alltunes.ps: alltunes.abc fmt/alltunes.fmt
	$(a2p) +C +k 4 +n +x +Ffmt/alltunes alltunes.abc \
	|PShdr alltunes '' alltunes \
	|PSftr %P $U %D >alltunes.ps
alltunes.pdf: alltunes.ps
	ps2pdf alltunes.ps alltunes.pdf

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

install:  alltunes.abc
	/bin/ln -f alltunes.abc ../Thompson.abc
	/bin/ln -f alltunes.abc ../../1779_Thompson.abc
	/bin/ln -f alltunes.abc ../../../24CountryDances_1779_Thompson.abc
