#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
U=http://trillian.mit.edu/~jc/music/abc/Scotland/by/Muriel_Johnstone
a2p=jcabc2ps


all: jigs reels hornpipes strathspeys


neat:         ; /bin/rm -f *- *.out *.log
clean:   neat ; /bin/rm -f *.ps *.pdf
clobber: clean; /bin/rm -f [a-z]*.abc

hornpipes:  hornpipes.abc hornpipes.ps hornpipes.pdf
hornpipes.abc: hornpipe/*.abc
	abcjoin +R +S hornpipe hornpipe/*.abc > hornpipes.abc
hornpipes.ps: hornpipes.abc fmt/hornpipes.fmt
	$(a2p) +x +Ffmt/hornpipes hornpipes.abc \
	|PShdr '%P' 'Hornpipess by Muriel Johnstone' '%P' \
	|PSftr %D $U/hornpipe/ %D >hornpipes.ps
hornpipes.pdf: hornpipes.ps
	ps2pdf hornpipes.ps hornpipes.pdf

jigs:  jigs.abc jigs.ps jigs.pdf
jigs.abc: jig/*.abc
	abcjoin +R +S jig jig/*.abc > jigs.abc
jigs.ps: jigs.abc fmt/jigs.fmt
	$(a2p) +x +Ffmt/jigs jigs.abc \
	|PShdr '%P' 'Jigs by Muriel Johnstone' '%P' \
	|PSftr %D $U/jig/ %D >jigs.ps
jigs.pdf: jigs.ps
	ps2pdf jigs.ps jigs.pdf

reels:  reels.abc reels.ps reels.pdf
reels.abc: reel/*.abc
	abcjoin +R +S reel reel/*.abc > reels.abc
reels.ps: reels.abc fmt/reels.fmt
	$(a2p) +x +Ffmt/reels reels.abc \
	|PShdr '%P' 'Reels by Muriel Johnstone' '%P' \
	|PSftr %D $U/reel/ %D >reels.ps
reels.pdf: reels.ps
	ps2pdf reels.ps reels.pdf

strathspeys:  strathspeys.abc strathspeys.ps strathspeys.pdf
strathspeys.abc: strathspey/*.abc
	abcjoin +R +S strathspey strathspey/*.abc > strathspeys.abc
strathspeys.ps: strathspeys.abc fmt/strathspeys.fmt
	$(a2p) +x +Ffmt/strathspeys strathspeys.abc \
	|PShdr '%P' 'Strathspeys by Muriel Johnstone' '%P' \
	|PSftr %D $U/strathspey/ %D >strathspeys.ps
strathspeys.pdf: strathspeys.ps
	ps2pdf strathspeys.ps strathspeys.pdf
