U=http://trillian.mit.edu/~jc/music/book/24CountryDances/1803/Preston

all: all1803TP install

## The file names start with the number that's below the clef and key signature.
#all1803TP= [0-9][0-9][0-9]_*.abc
#all1803TP: all1803TP.abc all1803TP.ps all1803TP.pdf
#all1803TP.abc: $(all1803TP) fmt/all1803TP.fmt
#	abcjoin +CS $(all1803TP) >all1803TP.abc
#all1803TP.ps: all1803TP.abc fmt/all1803TP.fmt
#	jcabc2ps all1803TP.abc +k0 +n +x +Ffmt/all1803TP.fmt \
#	|PShdr %P '24 Country Dances for 1803' %P \
#	|PSftr %D $U/ %D >all1803TP.ps
#all1803TP.pdf: all1803TP.ps
#	ps2pdf all1803TP.ps all1803TP.pdf
#
#all1803TP.fmt: fmt/all1803TP.fmt
#	ln -f fmt/all1803TP.fmt all1803TP.fmt

all1803TP: all1803TP1 all1803TP2
all1803TP= [0-9][0-9][0-9]_*.abc
all1803TP.abc: $(all1803TP)
	abcjoin +CS2 $(all1803TP) >all1803TP.abc

# Format using jcabc2ps:
all1803TP1: all1803TP.abc all1803TP1.ps all1803TP1.pdf
all1803TP1.ps: all1803TP.abc fmt/all1803TP1.fmt
	jcabc2ps +k4 +Ffmt/all1803TP1.fmt +n +x all1803TP.abc \
	|PShdr %P '24 Country Dances for the Year 1803 - Preston' %P \
	|PSftr %D $U/ %D >all1803TP1.ps
all1803TP1.pdf: all1803TP1.ps
	ps2pdf all1803TP1.ps all1803TP1.pdf

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

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


install: ../Preston.abc ../../1803_Preston.abc ../../../24CountryDances_1803_Preston.abc
../Preston.abc: all1803TP.abc
	ln -f all1803TP.abc ../Preston.abc
../../1803_Preston.abc: all1803TP.abc
	ln -f all1803TP.abc ../../1803_Preston.abc
../../../24CountryDances_1803_Preston.abc: all1803TP.abc
	ln -f all1803TP.abc ../../../24CountryDances_1803_Preston.abc
