# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
# This is the Makefile for "FIFTY OLD ENGLISH FOLK DANCE AIRS"  published  by #
# Edgar H.Hunt, published by Schott & Co.  Ltd.  in London, 1939.             #
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
U=http://trillian.mit.edu/~jc/music/book/FOEFDA

all: FOEFDA install

# Top-level targets:
FOEFDA: FOEFDA1 FOEFDA2

# Common FOEFDA.abc source file:
FOEFDA.abc: [0-9][0-9]_*.abc
	abcjoin +S2 [0-9][0-9]_*.abc >FOEFDA.abc

# Format using jcabc2ps:
FOEFDA1: FOEFDA.abc FOEFDA1.ps FOEFDA1.pdf
FOEFDA1= [0-9][0-9]_*.abc
FOEFDA1.ps: FOEFDA.abc fmt/FOEFDA1.fmt
	jcabc2ps +x +Ffmt/FOEFDA1.fmt +n -k4 +x FOEFDA.abc \
	|PShdr %P 'FIFTY OLD ENGLISH FOLK DANCE AIRS' %P \
	|PSftr %D $U/ %D >FOEFDA1.ps
FOEFDA1.pdf: FOEFDA1.ps
	ps2pdf FOEFDA1.ps FOEFDA1.pdf

# Format using abcm2ps:
FOEFDA2: FOEFDA.abc FOEFDA2.ps FOEFDA2.pdf
FOEFDA2= [0-9][0-9]_*.abc
FOEFDA2.ps: FOEFDA.abc fmt/FOEFDA2.fmt
	abcm2ps -x -F fmt/FOEFDA2.fmt FOEFDA.abc -O tmp.ps
	PShdr <tmp.ps %P 'FIFTY OLD ENGLISH FOLK DANCE AIRS' %P \
	|PSftr %D $U/ %D >FOEFDA2.ps
	rm tmp.ps
FOEFDA2.pdf: FOEFDA2.ps
	ps2pdf FOEFDA2.ps FOEFDA2.pdf

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

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