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

all: Bayard_DTFMTF1 install

Bayard_DTFMTF: Bayard_DTFMTF1 Bayard_DTFMTF2
Bayard_DTFMTF= [0-9][0-9][0-9][0-9][0-9][0-9]_*.abc
Bayard_DTFMTF.abc: $(Bayard_DTFMTF)
	abcjoin +CS2 $(Bayard_DTFMTF) >Bayard_DTFMTF.abc

# Format using jcabc2ps:
Bayard_DTFMTF1: Bayard_DTFMTF.abc Bayard_DTFMTF1.ps Bayard_DTFMTF1.pdf
Bayard_DTFMTF1.ps: Bayard_DTFMTF.abc fmt/DTFMTF1.fmt
	jcabc2ps +Ffmt/DTFMTF1.fmt -n +x Bayard_DTFMTF.abc \
	|PShdr %P 'Dance to the Fiddle, March to the Fife' %P \
	|PSftr %D $U/ %D >Bayard_DTFMTF1.ps
Bayard_DTFMTF1.pdf: Bayard_DTFMTF1.ps
	ps2pdf Bayard_DTFMTF1.ps Bayard_DTFMTF1.pdf

# Format using abcm2ps:
Bayard_DTFMTF2: Bayard_DTFMTF.abc Bayard_DTFMTF2.ps Bayard_DTFMTF2.pdf
Bayard_DTFMTF2.ps: Bayard_DTFMTF.abc fmt/DTFMTF2.fmt
	abcm2ps -x -F fmt/DTFMTF2.fmt Bayard_DTFMTF.abc -O tmp.ps
	PShdr <tmp.ps %P 'Dance to the Fiddle, March to the Fife' %P \
	|PSftr %D $U/ %D >Bayard_DTFMTF2.ps
	rm tmp.ps
Bayard_DTFMTF2.pdf: Bayard_DTFMTF2.ps
	ps2pdf Bayard_DTFMTF2.ps Bayard_DTFMTF2.pdf

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

install: ../Bayard_DTFMTF.abc 
../Bayard_DTFMTF.abc: Bayard_DTFMTF.abc
	ln -f Bayard_DTFMTF.abc ../Bayard_DTFMTF.abc
