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

all: MoF specials install

# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
# The tune files have names of the form VPPPN_Title.abc where V is the volume #
# number,  PPP  is the page number, and N is the tune number within the page. #
# The title is as written, with underscores  between  the  words.   Sometimes #
# there's no real title, just a descriptive word, so that's used.             #
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #

MoF= [0-9][0-9][0-9][0-9][0-9]_*.abc
MoF: MoF.abc MoF.ps MoF.pdf
MoF.abc: $(MoF)
	abcjoin +S2 $(MoF) >MoF.abc
MoF.ps: MoF.abc fmt/MoF.fmt
	abcm2ps -j 0 -x -F fmt/MoF MoF.abc -O tmp.ps
	PShdr <tmp.ps MoF 'The Man of Feeling' MoF \
	|PSftr %P $U/ %D >MoF.ps
	rm tmp.ps
MoF.pdf: MoF.ps
	ps2pdf MoF.ps MoF.pdf

neat:         ; /bin/rm -f *-
clean:   neat ; /bin/rm -f *.ps *.pdf
clobber: clean; /bin/rm -f MoF.*

install: ../MoF.abc
../MoF.abc: MoF.abc
	/bin/ln -f MoF.abc ../MoF.abc

# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
# Build some special pages:

specials: MoF10121

# This tune gets an annoying warning from abcm2ps that I can't fix:
MoF10121= 10121_The_Blue_Bell_of_Scotland.abc
MoF10121: MoF10121.abc MoF10121.ps MoF10121.pdf
MoF10121.abc: $(MoF10121)
	abcjoin +S2 $(MoF10121) >MoF10121.abc
MoF10121.ps: MoF10121.abc fmt/MoF10121.fmt
	abcm2ps -j 0 -x -F fmt/MoF10121 MoF10121.abc -O tmp.ps
	PShdr <tmp.ps MoF10121 'The Man of Feeling' MoF10121 \
	|PSftr %P $U/ %D >MoF10121.ps
	rm tmp.ps
MoF10121.pdf: MoF10121.ps
	ps2pdf MoF10121.ps MoF10121.pdf

