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

all: tunes install

all: tunes install

tunes: tunes1 tunes2
tunes= [0-9][0-9][0-9]_*.abc
tunes.abc: $(tunes)
	abcjoin +C +S2 $(tunes) >tunes.abc

# Format using jcabc2ps (no overlays):
tunes1: tunes.abc tunes1.ps tunes1.pdf
tunes1.ps: tunes.abc fmt/tunes1.fmt
	jcabc2ps +k4 +Ffmt/tunes1.fmt +n +x tunes.abc \
	|PShdr %P "Thompson's 24 Country Dances for the year 1802" %P \
	|PSftr %D $U/ %D >tunes1.ps
tunes1.pdf: tunes1.ps
	ps2pdf tunes1.ps tunes1.pdf

# Format using abcm2ps (may use overlays):
tunes2: tunes.abc tunes2.ps tunes2.pdf
tunes2.ps: tunes.abc fmt/tunes2.fmt
	abcm2ps -x -j 4 -F fmt/tunes2.fmt tunes.abc -O tmp.ps
	PShdr <tmp.ps %P "Thompson's 24 Country Dances for the year 1802" %P \
	|PSftr %D $U/ %D >tunes2.ps
	rm tmp.ps
tunes2.pdf: tunes2.ps
	ps2pdf tunes2.ps tunes2.pdf

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

install: ../Thompson.abc ../../1802_Thompson.abc ../../../24CountryDances_1802_Thompson.abc
../Thompson.abc: tunes.abc
	ln -f tunes.abc ../Thompson.abc
../../1802_Thompson.abc: tunes.abc
	ln -f tunes.abc ../../1802_Thompson.abc
../../../24CountryDances_1802_Thompson.abc: tunes.abc
	ln -f tunes.abc ../../../24CountryDances_1802_Thompson.abc
