#  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
# This is the Makefile for MMM2 (Miss Milligan's Miscellany v.2).  I've  given #
# each  tune  two names.  One is just the tune's name, with '_' for spaces and #
# other non-letter (or -digit) characters are omitted.  The other has  a  tune #
# number  from  the collection plus the dance's name with same '_' for spaces, #
# and also the -K-B-S.abc ending, where K is the key, B is the number of  bars #
# for  one round of the dance, and S is the number of staffs.  The staff count #
# is useful in formatting tune sets so they fit on a page.                     #
#  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
U=http://trillian.mit.edu/music/book/SCD/MMM2

all: MMM2 ../MMM2.abc

# Be careful that MMM2 doesn't include MMM2.abc in the list.  The names
# of files with just the tune title for a name (and .abc suffix) should
# start with one capital letter and one lower-case letter.

MMM2= 02[0-9][0-9]-*.abc tunes [A-Z][a-z]*.abc
MMM2: MMM2.abc MMM2.pdf
MMM2.abc: $(MMM2)
	abcjoin +CS2 $(MMM2) >MMM2.abc
MMM2.ps: MMM2.abc fmt/MMM2.fmt
	jcabc2ps MMM2.abc +n +x +Ffmt/MMM2.fmt \
	|PShdr '%P' 'RSCDS Book 6' '%P' \
	|PSftr %D $U/ %D >MMM2.ps
MMM2.pdf: MMM2.ps
	ps2pdf MMM2.ps MMM2.pdf

../MMM2.abc: MMM2.abc
	ln -f MMM2.abc ../MMM2.abc
	ln -f MMM2.abc ../../MMM2.abc

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