U=http://trillian.mit.edu/~jc/music/book/BotCDaSS

all: alldances install

alldances: alldances1 alldances2
alldances= [0-9][0-9][0-9]_*.abc
alldances.abc: $(alldances)
	abcjoin +C $(alldances) >alldances.abc

# Format using jcabc2ps:
alldances1: alldances.abc alldances1.ps alldances1.pdf
alldances1.ps: alldances.abc fmt/BotCDaSS1.fmt
	jcabc2ps +Ffmt/BotCDaSS1.fmt +n alldances.abc \
	|PShdr %P '24 Country Dances for the Year 1794 - Preston' %P \
	|PSftr %D $U/ %D >alldances1.ps
alldances1.pdf: alldances1.ps
	ps2pdf alldances1.ps alldances1.pdf

# Format using abcm2ps:
alldances2: alldances.abc alldances2.ps alldances2.pdf
alldances2.ps: alldances.abc fmt/BotCDaSS2.fmt
	abcm2ps -x -j 4 -F fmt/BotCDaSS2.fmt alldances.abc -O tmp.ps
	PShdr <tmp.ps %P '24 Country Dances for the Year 1794 - Preston' %P \
	|PSftr %D $U/ %D >alldances2.ps
	rm tmp.ps
alldances2.pdf: alldances2.ps
	ps2pdf alldances2.ps alldances2.pdf

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

install: ../BotCDaSS.abc
../BotCDaSS.abc: alldances.abc
	ln -f alldances.abc ../BotCDaSS.abc
