# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
# This is the Makefile for the  John  Johnson's  "Choice  Collection  of  200 #
# Favorite Country Dances" Vol.8, published in 1758.                          #
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
U=http://trillian.mit.edu/~jc/music/book/JohnJohnson/1758/ChoiceCollection

all: ChoiceCollection install

ChoiceCollection: ChoiceCollection1 ChoiceCollection2

# Format using jcabc2ps:
ChoiceCollection1: ChoiceCollection1.abc ChoiceCollection1.ps ChoiceCollection1.pdf
ChoiceCollection1= [0-9][0-9][0-9][-_]*.abc
ChoiceCollection1.abc: $(ChoiceCollection1)
	abcjoin +CS2 $(ChoiceCollection1) >ChoiceCollection1.abc

ChoiceCollection1.ps: ChoiceCollection1.abc fmt/V1.fmt
	jcabc2ps +k2 +Ffmt/V1.fmt +n +x ChoiceCollection1.abc \
	|PShdr %P 'JohnJohnson - ChoiceCollection 1758' %P \
	|PSftr %D $U/ %D >ChoiceCollection1.ps
ChoiceCollection1.pdf: ChoiceCollection1.ps
	ps2pdf ChoiceCollection1.ps ChoiceCollection1.pdf

# Format using abcm2ps:
ChoiceCollection2: ChoiceCollection2.abc ChoiceCollection2.ps ChoiceCollection2.pdf
ChoiceCollection2= [0-9][0-9][0-9][=_]*.abc
ChoiceCollection2.abc: $(ChoiceCollection2)
	abcjoin +CS2 $(ChoiceCollection2) >ChoiceCollection2.abc
ChoiceCollection2.ps: ChoiceCollection2.abc fmt/V2.fmt
	abcm2ps -x -F fmt/V2.fmt ChoiceCollection2.abc -O tmp.ps
	PShdr %P 'JohnJohnson - ChoiceCollection 1758' %P <tmp.ps \
	|PSftr %D $U/ %D >ChoiceCollection2.ps
	rm tmp.ps
ChoiceCollection2.pdf: ChoiceCollection2.ps
	ps2pdf ChoiceCollection2.ps ChoiceCollection2.pdf

# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
neat:         ; /bin/rm -f *- *.bak *.out
clean:    neat; /bin/rm -f *.ps *.pdf start time done
clobber: clean; /bin/rm -f ChoiceCollection*.abc

# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
# We link the full collection into several parent directories, with names that
# we hope will be unique:

install: \
	../ChoiceCollectionVol8-V1.abc \
	../ChoiceCollectionVol8-V2.abc \
	../../JohnJohnson_ChoiceCollectionVol8-V1.abc \
	../../JohnJohnson_ChoiceCollectionVol8-V2.abc \

../ChoiceCollectionVol8-V1.abc: ChoiceCollection1.abc
	ln -f ChoiceCollection1.abc ../ChoiceCollectionVol8-V1.abc
../../JohnJohnson_ChoiceCollectionVol8-V1.abc: ChoiceCollection1.abc
	ln -f ChoiceCollection1.abc ../../JohnJohnson_ChoiceCollectionVol8-V1.abc

../ChoiceCollectionVol8-V2.abc: ChoiceCollection2.abc
	ln -f ChoiceCollection2.abc ../ChoiceCollectionVol8-V2.abc
../../JohnJohnson_ChoiceCollectionVol8-V2.abc: ChoiceCollection2.abc
	ln -f ChoiceCollection2.abc ../../JohnJohnson_ChoiceCollectionVol8-V2.abc

# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
