# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
U=http://trillian.mit.edu/~jc/music/abc/Ireland/
H=http://john-chambers.us/~jc/music/Ireland/

a2p=jcabc2ps

.SUFFIXES:

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Note that the "clobber" entry deletes the abc files in this directory. They #
# are  all medleys, derived from single-tune files in subdirectories, so this #
# shouldn't actually lose any music.  But this means that any abc files  here #
# must either be derived files or must be linked somewhere else.              #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

all: special medleys books # .htaccess
#	tunes
#	books

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# MEDLEYS, using jc's abcmedley program.

medleys: 

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Here are our cleanup entries. The "clobber" entry deletes all the lowercase
# abc  files, but not those whose names start with an uppercase letter.  This
# will leave all our dance medleys in place, while deleting the "books".

neat: ; rm -f *- core *.out Out.ps
clean: neat; rm -f *.log *.pdf *.ps new.* $(books_abc)
	find new/ -name '*.abc' -mtime +30 -exec ls -l {} ';' -exec rm {} ';'
	rm -f books.abc air.abc hornpipe.abc jig.abc march.abc polka.abc reel.abc \
		shottish.abc slipjig.abc waltz.abc tunes.abc new.abc reels.abc
clobber: clean; rm -f [a-z]??*.abc new/*.abc
	rm -rf program/[12][0-9]*/

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Here's how we package it up for distribution:

D=`dt`
tarkit: ../Ireland-$D.tar.gz
../Ireland-$D.tar.gz: ../Ireland-$D.tar
	gzip ../Ireland-$D.tar
../Ireland-$D.tar: Makefile * */*.abc
	make clean
	tar cf ../Ireland-$D.tar .

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# The .htaccess file explains to the apache web server what's in  the  files.
# We  fill  in  descriptions of the abc files from the first T: line, so that
# the dance names appear in HTML listings of the  directory.   This  actually
# propagates to subdirectories, so we only to do it here.

.htaccess: *.abc
	abcDesc *.abc

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Here are some entries for creating programs:

program programs: 

# 2006____ _:__ pm
# Dance leader:
# Musicians:
#
2006____=
2006____: program/2006____
	mkprog 2006____ $(2006____)
P2006____: program/2006____
	mkprog -p 2006____ $(2006____)
program/2006____:
	mkdir -p program/2006____

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Entries to create special files if they are clobbered:

special: _1.abc _2.abc _3.abc fonts.fmt

_3.abc: ../misc/_3.abc; ln ../misc/_3.abc _3.abc
_2.abc: ../misc/_2.abc; ln ../misc/_2.abc _2.abc
_1.abc: ../misc/_1.abc; ln ../misc/_1.abc _1.abc

fonts.fmt: ../fmt/fonts.fmt; ln -f ../fmt/fonts.fmt fonts.fmt
_65.fmt:   ../fmt/_65.fmt;   ln -f ../fmt/_65.fmt   _65.fmt
_70.fmt:   ../fmt/_70.fmt;   ln -f ../fmt/_70.fmt   _70.fmt
_75.fmt:   ../fmt/_75.fmt;   ln -f ../fmt/_75.fmt   _75.fmt
_80.fmt:   ../fmt/_80.fmt;   ln -f ../fmt/_80.fmt   _80.fmt

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# The tunes here are mostly in single-tune files in subdirectories, which is
# the easiest way to deal with them. However, some people (e.g. the folks
# working on network intexes) prefer to download large files full of tunes.
# To accomodate them (until they come to understand the virtues of small
# files), here are some rules for building "books" of tunes:

books_abc= new.abc \
	air.abc hornpipe.abc jig.abc march.abc reel.abc shottish.abc \
	slipjig.abc waltz.abc

books_ps= new.ps \
	air.ps hornpipe.ps jig.ps march.ps reel.ps shottish.ps \
	slipjig.ps waltz.ps

books_pdf= new.pdf \
	air.pdf hornpipe.pdf jig.pdf march.pdf reel.pdf shottish.pdf \
	slipjig.pdf waltz.pdf

books: books.abc books.pdf

books.abc: $(books_abc)
books.ps:  $(books_ps)
books.pdf: $(books_pdf)

air.abc:        air/*.abc;        abcjoin +R +S air        air/*.abc        > air.abc
hornpipe.abc:   hornpipe/*.abc;   abcjoin +R +S hornpipe   hornpipe/*.abc   > hornpipe.abc
jig.abc:        jig/*.abc;        abcjoin +R +S jig        jig/*.abc        > jig.abc
march.abc:      march/*.abc;      abcjoin +R +S march      march/*.abc      > march.abc
polka.abc:      polka/*.abc;      abcjoin +R +S polka      polka/*.abc      > polka.abc
reel.abc:       reel/*.abc;       abcjoin +R +S reel       reel/*.abc       > reel.abc
song.abc:       song/*.abc;       abcjoin +R +S song       song/*.abc       > song.abc
shottish.abc:   shottish/*.abc;   abcjoin +R +S shottish   shottish/*.abc   > shottish.abc
slipjig.abc:    slipjig/*.abc;    abcjoin +R +S slipjig    slipjig/*.abc    > slipjig.abc
waltz.abc:      waltz/*.abc;      abcjoin +R +S waltz      waltz/*.abc      > waltz.abc

air.ps:        air.abc;        $(a2p) +c air.abc        +x +Ffmt/_65 |PSftr "Page %P" $(U)air/        %D >air.ps
hornpipe.ps:   hornpipe.abc;   $(a2p) +c hornpipe.abc   +x +Ffmt/_65 |PSftr "Page %P" $(U)hornpipe/   %D >hornpipe.ps
jig.ps:        jig.abc;        $(a2p) +c jig.abc        +x +Ffmt/_65 |PSftr "Page %P" $(U)jig/        %D >jig.ps
march.ps:      march.abc;      $(a2p) +c march.abc      +x +Ffmt/_65 |PSftr "Page %P" $(U)march/      %D >march.ps
polka.ps:      polka.abc;      $(a2p) +c polka.abc      +x +Ffmt/_65 |PSftr "Page %P" $(U)polka/      %D >polka.ps
reel.ps:       reel.abc;       $(a2p) +c reel.abc       +x +Ffmt/_65 |PSftr "Page %P" $(U)reel/       %D >reel.ps
song.ps:       song.abc;       $(a2p) +c song.abc       +x +Ffmt/_65 |PSftr "Page %P" $(U)song/       %D >song.ps
shottish.ps:   shottish.abc;   $(a2p) +c shottish.abc   +x +Ffmt/_65 |PSftr "Page %P" $(U)shottish/   %D >shottish.ps
slipjig.ps:    slipjig.abc;    $(a2p) +c slipjig.abc    +x +Ffmt/_65 |PSftr "Page %P" $(U)slipjig/    %D >slipjig.ps
waltz.ps:      waltz.abc;      $(a2p) +c waltz.abc      +x +Ffmt/_65 |PSftr "Page %P" $(U)waltz/      %D >waltz.ps

air.pdf:        air.ps;        ps2pdf air.ps
hornpipe.pdf:   hornpipe.ps;   ps2pdf hornpipe.ps
jig.pdf:        jig.ps;        ps2pdf jig.ps
march.pdf:      march.ps;      ps2pdf march.ps
polka.pdf:      polka.ps;      ps2pdf polka.ps
song.pdf:       song.ps;       ps2pdf song.ps
reel.pdf:       reel.ps;       ps2pdf reel.ps
shottish.pdf:   shottish.ps;   ps2pdf shottish.ps
slipjig.pdf:    slipjig.ps;    ps2pdf slipjig.ps
waltz.pdf:      waltz.ps;      ps2pdf waltz.ps

air:        air.abc        air.pdf
hornpipe:   hornpipe.abc   hornpipe.pdf
jig:        jig.abc        jig.pdf
march:      march.abc      march.pdf
polka:      polka.abc      polka.pdf
reel:       reel.abc       reel.pdf
shottish:   shottish.abc   shottish.pdf
slipjig:    slipjig.abc    slipjig.pdf
waltz:      waltz.abc      waltz.pdf

# reels
reels= reel_40 reel_48 reel_Am reel_Em reel_Dm reel_F
reels: $(reels)

# reels in A
reel_A: reel_A.abc reel_A.pdf
reel_A.abc: reel/*.abc
	egrep -il '^K: *A( *|maj|mix)*\>' reel/*.abc |xargs abcjoin +R +S >reel_A.abc
reel_A.ps: reel_A.abc fmt/_60.fmt
	$(a2p) reel_A.abc +c +x +Ffmt/_60 \
	|PShdr reel_A '' reel_A \
	|PSftr "Page %P" $U/reel_A/ %D >reel_A.ps
reel_A.pdf: reel_A.ps
	ps2pdf reel_A.ps reel_A.pdf

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

# tunes
tunes= \
	jig/BanksOfLochGowna_Bm.abc \
	jig/HumoursOfBandon_Am.abc \
	jig/JoeDerranesJ_Bm.abc \
	jig/PenultimateJig.abc \
	jig/TripToAthlone3_D.abc \
	jig/WillieColemansJ2_G.abc \
	reel/AllAroundTheWorld_D_4.abc \
	reel/BoyneHunt_D.abc \
	reel/ConcertinaReel_D_4.abc \
	reel/EarlsChair_D_4.abc \
	reel/FloggingReel_G.abc \
	reel/GravelWalk.abc \
	reel/HighReel_A.abc \
	reel/JackieColemansNo1_D_2.abc \
	reel/LadyAnneMontgomery_D.abc \
	reel/LongfordCollector_G.abc \
	reel/McMahonsR.abc \
	reel/MusicalPriest.abc \
	reel/OldCopperplate_Am.abc \
	reel/PigeonOnTheGate1_Em_3.abc \
	reel/SailorsBonnet_D.abc \
	reel/SallyGardens.abc \
	reel/SilverSpear_D.abc \
	reel/SilverSpire2_D.abc \
	reel/TarboltonReel_Em_3.abc \
	reel/TomBillysReel_D_3.abc \
	reel/TossTheFeathers.abc \
	reel/TripToDurrow.abc \
	reel/TripToDurrow3.abc \

tunes: tunes.abc tunes.pdf
tunes.abc: $(tunes)
	abcjoin +CRS $(tunes) >tunes.abc
tunes.ps: tunes.abc fmt/tunes.fmt
	$(a2p) tunes.abc +x +Ffmt/tunes \
	|PShdr %P "IRISH TUNES" %P \
	|PSftr %D $U %D >tunes.ps
tunes.pdf: tunes.ps
	ps2pdf tunes.ps

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

new: */*.abc # new.abc new.pdf
	find */ -mtime -30 -name '*.abc' | xargs tonew
	make new.abc new.pdf
new.abc: new/*.abc
	abcjoin +RS new new/*.abc > new.abc
new.ps:  new.abc fmt/new.fmt
	$(a2p) new.abc +n +x +Ffmt/new.fmt \
	|PShdr %P "NEW IRISH TUNES" %P \
	|PSftr %D $(U)new/ %D >new.ps
new.pdf: new.ps
	ps2pdf new.ps

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Build a few pages of reels for various purposes:

reels= \
	reel/AllAroundTheWorld_D_4.abc \
	reel/ConcertinaReel_D_4.abc \
	reel/EarlsChair_D_4.abc \
	reel/FloggingReel_G.abc \
	reel/GravelWalk.abc \
	reel/HighReel_A.abc \
	reel/JackieColemansNo1_D_2.abc \
	reel/JackieColemansNo1_D_3.abc \
	reel/LadyAnneMontgomery_D.abc \
	reel/McMahonsR.abc \
	reel/MusicalPriest.abc \
	reel/PigeonOnTheGate1_Em_3.abc \
	reel/PigeonOnTheGate1_Em_4.abc \
	reel/SailorsBonnet_D.abc \
	reel/SallyGardens.abc \
	reel/SilverSpear_D.abc \
	reel/TarboltonReel_Em_3.abc \
	reel/TarboltonReel_Em_4.abc \
	reel/TomBillysReel_D_3.abc \
	reel/TomBillysReel_D_4.abc \
	reel/TossTheFeathers.abc \
	reel/TripToDurrow.abc \
	reel/TripToDurrow3.abc \

reels: reels.abc reels.pdf
reels.abc: $(reels)
	abcjoin +CRS $(reels) > reels.abc
reels.ps:  reels.abc fmt/reels.fmt
	$(a2p) reels.abc +x +Ffmt/reels \
	|PShdr %P "IRISH REELS" %P \
	|PSftr %D $(U)reels/ %D >reels.ps
reels.pdf: reels.ps
	ps2pdf reels.ps

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

incips: incip_jig.ps incip_reel.ps incip_march.ps incip_waltz.ps

incip_jig.abc:        jig/[a-Z]*.abc;        abc2bars "jigs"        jig/[a-Z]*.abc        > incip_jig.abc
incip_reel.abc:       reel/[a-Z]*.abc;       abc2bars "reels"       reel/[a-Z]*.abc       > incip_reel.abc
incip_march.abc:      march/[a-Z]*.abc;      abc2bars "marches"     march/[a-Z]*.abc      > incip_march.abc
incip_waltz.abc:      waltz/[a-Z]*.abc;      abc2bars "waltzes"     waltz/[a-Z]*.abc      > incip_waltz.abc

incip_jig.ps:        incip_jig.abc;        $(a2p) incip_jig.abc        -1 -c > incip_jig.ps
incip_reel.ps:       incip_reel.abc;       $(a2p) incip_reel.abc       -1 -c > incip_reel.ps
incip_march.ps:      incip_march.abc;      $(a2p) incip_march.abc      -1 -c > incip_march.ps
incip_waltz.ps:      incip_waltz.abc;      $(a2p) incip_waltz.abc      -1 -c > incip_waltz.ps

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# xxx doesn't look good with full page width. American "standard" 8.5x11
# paper has a "width" of 541 points. The following produces a close to
# centered version with an extra inch of margin.

xxx.ps: xxx.abc
	$(a2p) -m 100 -w 400 xxx.abc \
	|PShdr "" "" "" \
	|PSftr %D $U %D >xxx.ps

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Here is a prototype for making medley pages in various ways:

# jj
jj= _.abc
jj: jj.abc jj.pdf
jj.abc: $(jj) # hdr/jj.hdr
	abcjoin +s $(jj) >jj.abc
jj.ps: jj.abc fmt/_75.fmt
	$(a2p) +c jj.abc +Ffmt/_75 \
	|PShdr jj "" jj \
	|PSftr %D $U %D >jj.ps
jj.pdf: jj.ps
	ps2pdf jj.ps

# mm0
mm: mm0

# mm0
mm0= x10.abc
mm0: mm0.abc mm0.pdf
mm0.abc: hdr/mm.hdr $(mm0)
	abcmedley mm $(mm0) >mm0.abc
mm0.ps: mm0.abc fmt/_75.fmt
	$(a2p) mm0.abc +Ffmt/_75 \
	|PShdr mm "" mm \
	|PSftr %D $U %D >mm0.ps
mm0.pdf: mm0.ps
	ps2pdf mm0.ps

# xx
xx= x8.abc
xx: xx.abc xx.pdf
xx.abc: hdr/xx.hdr $(xx)
	abcmedley xx $(xx) >xx.abc
xx.ps: xx.abc fmt/_75.fmt
	$(a2p) xx.abc +Ffmt/_75 \
	|PShdr xx "" xx \
	|PSftr %D $U %D >xx.ps
xx.pdf: xx.ps
	ps2pdf xx.ps

# yy
yy= x8.abc
yy: yy.abc yy.pdf
yy.abc: hdr/yy.hdr $(yy)
	abcmedley yy $(yy) >yy.abc
yy.ps: yy.abc fmt/_75.fmt
	$(a2p) yy.abc +Ffmt/_75 \
	|PShdr "" "" "" |\
	PSftr %D $U %D >yy.ps
yy.pdf: yy.ps
	ps2pdf yy.ps

# Multiple versions:

# zz
zz: zz0
# zz 0
zz0= x8.abc
zz0: zz0.abc zz0.pdf
zz0.abc: hdr/zz.hdr $(zz0)
	abcmedley "zz" $(zz0) >zz0.abc
zz0.ps: zz0.abc fmt/_75.fmt
	$(a2p) zz0.abc +Ffmt/_75 \
	|PShdr "" "" "" \
	|PSftr %D $U %D >zz0.ps
zz0.pdf: zz0.ps
	ps2pdf zz0.ps

# Set Name (info)
Set_Name: Set_Name-info
Set_Name-info= hdr/Set_Name-info.hdr \
	___/Set_Name.abc \
	ftr/Set_Name-info.ftr
Set_Name-info: Set_Name-info.abc Set_Name-info.pdf
Set_Name-info.abc: $(Set_Name-info); abcjoin $(Set_Name-info) >Set_Name-info.abc
	ln -f Set_Name-info.abc ___/Set_Name-info.abc
Set_Name-info.ps: Set_Name-info.abc fmt/pdf_65.fmt
	$(a2p) Set_Name-info.abc +Ffmt/pdf_65.fmt  \
	|PShdr "Set Name" "" "Set Name"  \
	|PSftr %D $U/ %D >Set_Name-info.ps
Set_Name-info.pdf: Set_Name-info.ps; ps2pdf Set_Name-info.ps
	ln -f Set_Name-info.pdf img/Set_Name.pdf
hdr/Set_Name-info.hdr: ; touch hdr/Set_Name-info.hdr
ftr/Set_Name-info.ftr: ; touch ftr/Set_Name-info.ftr

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

singles: LongNote PigeonOnTheGate SalamancaReel

# Bridget OMalley #4
Bridget_OMalley_4= waltz/Bridget_OMalley_4-C-16-4wW.abc waltz/Bridget_OMalley_2-G-16-2.abc
Bridget_OMalley_4: Bridget_OMalley_4.abc Bridget_OMalley_4.pdf
Bridget_OMalley_4.abc: $(Bridget_OMalley_4) # hdr/Bridget_OMalley_4.hdr
	abcjoin +s $(Bridget_OMalley_4) >Bridget_OMalley_4.abc
Bridget_OMalley_4.ps: Bridget_OMalley_4.abc fmt/_70.fmt
	$(a2p) +n Bridget_OMalley_4.abc +Ffmt/_70 \
   |PShdr Bridget_OMalley_4 "" Bridget_OMalley_4 \
   |PSftr %D $U %D >Bridget_OMalley_4.ps
Bridget_OMalley_4.pdf: Bridget_OMalley_4.ps
	ps2pdf Bridget_OMalley_4.ps

# Carolan's Quarrel with the Landlady
CarolansQuarrelWithTheLandlady= \
	waltz/CarolansQuarrelWithTheLandlady1_Em.abc \
	waltz/CarolansQuarrelWithTheLandlady2_Em.abc
CarolansQuarrelWithTheLandlady: CarolansQuarrelWithTheLandlady.abc CarolansQuarrelWithTheLandlady.pdf
CarolansQuarrelWithTheLandlady.abc: $(CarolansQuarrelWithTheLandlady) # hdr/CarolansQuarrelWithTheLandlady.hdr
	abcjoin +s $(CarolansQuarrelWithTheLandlady) >CarolansQuarrelWithTheLandlady.abc
CarolansQuarrelWithTheLandlady.ps: CarolansQuarrelWithTheLandlady.abc fmt/_75.fmt
	$(a2p) CarolansQuarrelWithTheLandlady.abc +Ffmt/_75 \
	|PShdr CarolansQuarrel "" CarolansQuarrel \
	|PSftr %D $U %D >CarolansQuarrelWithTheLandlady.ps
CarolansQuarrelWithTheLandlady.pdf: CarolansQuarrelWithTheLandlady.ps
	ps2pdf CarolansQuarrelWithTheLandlady.ps

# Christmas Eve
ChristmasEve= \
	reel/ChristmasEve_1.abc \
	reel/ChristmasEve_2.abc \
	session/Christmas_Eve_1_DM.abc \
	xmas/ChristmasEve_2.abc \
	xmas/ChristmasEve_3.abc \
	air/ChristmasEve_3.abc
ChristmasEve: ChristmasEve.abc ChristmasEve.pdf
ChristmasEve.abc: $(ChristmasEve) # hdr/ChristmasEve.hdr
	abcjoin +s $(ChristmasEve) >ChristmasEve.abc
ChristmasEve.ps: ChristmasEve.abc fmt/_50.fmt
	$(a2p) +c ChristmasEve.abc +Ffmt/_50 \
	|PShdr ChristmasEve "" ChristmasEve \
	|PSftr %D $U %D >ChristmasEve.ps
ChristmasEve.pdf: ChristmasEve.ps
	ps2pdf ChristmasEve.ps

# Dan Breen's
Dan_Breens= tmp/Dan_Breens_1.abc tmp/Dan_Breens_2.abc tmp/Dan_Breens_3.abc tmp/Dan_Breens_4.abc
Dan_Breens: Dan_Breens.abc Dan_Breens.pdf
Dan_Breens.abc: $(Dan_Breens) # hdr/Dan_Breens.hdr
	abcjoin +s $(Dan_Breens) >Dan_Breens.abc
Dan_Breens.ps: Dan_Breens.abc fmt/_75.fmt
	$(a2p) +c Dan_Breens.abc +Ffmt/_75 \
	|PShdr Dan_Breens "" Dan_Breens \
	|PSftr %D $U %D >Dan_Breens.ps
Dan_Breens.pdf: Dan_Breens.ps
	ps2pdf Dan_Breens.ps

# Danny_Boy
Danny_Boy= song/Danny_Boy_2V-A-16-.abc song/Danny_Boy_2V-G-16-.abc
Danny_Boy: Danny_Boy.abc Danny_Boy.pdf
Danny_Boy.abc: $(Danny_Boy) # hdr/Danny_Boy.hdr
	abcjoin +s $(Danny_Boy) >Danny_Boy.abc
Danny_Boy.ps: Danny_Boy.abc fmt/_75.fmt
	$(a2p) +c Danny_Boy.abc +Ffmt/_75 \
	|PShdr Danny_Boy "" Danny_Boy \
	|PSftr %D $U %D >Danny_Boy.ps
Danny_Boy.pdf: Danny_Boy.ps
	ps2pdf Danny_Boy.ps Danny_Boy.pdf

# Do You Love an Apple?
Do_You_Love_an_Apple: Do_You_Love_an_Apple-G,D-16-7w11

# Do You Love an Apple?
Do_You_Love_an_Apple-G,D-16-7w11= hdr/Do_You_Love_an_Apple-G,D-16-7w11.hdr \
	song/Do_You_Love_an_Apple-G-16-2w11.abc \
	song/Do_You_Love_an_Apple-D-16-2.abc \
	ftr/Do_You_Love_an_Apple-G,D-16-7w11.ftr
Do_You_Love_an_Apple-G,D-16-7w11: Do_You_Love_an_Apple-G,D-16-7w11.abc Do_You_Love_an_Apple-G,D-16-7w11.pdf
Do_You_Love_an_Apple-G,D-16-7w11.abc: $(Do_You_Love_an_Apple-G,D-16-7w11) # hdr/Do_You_Love_an_Apple-G,D-16-7w11.hdr
	abcjoin +s $(Do_You_Love_an_Apple-G,D-16-7w11) >Do_You_Love_an_Apple-G,D-16-7w11.abc
Do_You_Love_an_Apple-G,D-16-7w11.ps: Do_You_Love_an_Apple-G,D-16-7w11.abc fmt/_80.fmt
	$(a2p) -c Do_You_Love_an_Apple-G,D-16-7w11.abc +Ffmt/_80.fmt |\
	PShdr 'Do You Love an Apple' "$H/" 'Do You Love an Apple' |\
	PSftr %D $U %D >Do_You_Love_an_Apple-G,D-16-7w11.ps
Do_You_Love_an_Apple-G,D-16-7w11.pdf: Do_You_Love_an_Apple-G,D-16-7w11.ps
	ps2pdf Do_You_Love_an_Apple-G,D-16-7w11.ps
	ln -f Do_You_Love_an_Apple-G,D-16-7w11.pdf img/Do_You_Love_an_Apple-G,D-16-7w11.PDF
	ln -f Do_You_Love_an_Apple-G,D-16-7w11.abc song/Do_You_Love_an_Apple-G,D-16-7w11.abc
hdr/Do_You_Love_an_Apple-G,D-16-7w11.hdr: ; touch hdr/Do_You_Love_an_Apple-G,D-16-7w11.hdr
ftr/Do_You_Love_an_Apple-G,D-16-7w11.ftr: ; touch ftr/Do_You_Love_an_Apple-G,D-16-7w11.ftr

# Eddie_Kellys_Jig
Eddie_Kellys_Jig= \
	jig/Eddie_Kellys_Jig_No_1-Em-32-2.abc \
	jig/Eddie_Kellys_Jig_No_2-Em-32-2.abc
Eddie_Kellys_Jig: Eddie_Kellys_Jig.abc Eddie_Kellys_Jig.pdf
Eddie_Kellys_Jig.abc: $(Eddie_Kellys_Jig) hdr/Eddie_Kellys_Jig.hdr
	abcjoin +s $(Eddie_Kellys_Jig) >Eddie_Kellys_Jig.abc
Eddie_Kellys_Jig.ps: Eddie_Kellys_Jig.abc fmt/_70.fmt
	$(a2p) Eddie_Kellys_Jig.abc +Ffmt/_70 \
	|PShdr Eddie_Kellys_Jig "" Eddie_Kellys_Jig \
	|PSftr %D $U %D >Eddie_Kellys_Jig.ps
Eddie_Kellys_Jig.pdf: Eddie_Kellys_Jig.ps
	ps2pdf Eddie_Kellys_Jig.ps

# Egans_Johnnys_Polka
Egans_Johnnys_Polka= hdr/Egans_Johnnys_Polka.hdr \
	polka/Egans_Polka-D-32-2.abc \
	polka/Johnny_Mickeys_Polka-G-32-2.abc
Egans_Johnnys_Polka: Egans_Johnnys_Polka.abc Egans_Johnnys_Polka.pdf
Egans_Johnnys_Polka.abc: $(Egans_Johnnys_Polka)
	abcjoin +s $(Egans_Johnnys_Polka) >Egans_Johnnys_Polka.abc
Egans_Johnnys_Polka.ps: Egans_Johnnys_Polka.abc fmt/_70.fmt
	$(a2p) Egans_Johnnys_Polka.abc +Ffmt/_70 \
	|PShdr "Egan's & Johnnys' Polka" "%" "Egan's & Johnny's Polka" \
	|PSftr %D $U %D >Egans_Johnnys_Polka.ps
Egans_Johnnys_Polka.pdf: Egans_Johnnys_Polka.ps
	ps2pdf Egans_Johnnys_Polka.ps
	Ln.sh  Egans_Johnnys_Polka.pdf img/
	Ln.sh  Egans_Johnnys_Polka.abc set/
hdr/Egans_Johnnys_Polka.hdr: ; touch hdr/Egans_Johnnys_Polka.hdr

# General Guinness (song)
General_Guinness= hdr/General_Guinness.hdr \
	General_Guinness/General_Guinness-G-16-4w8W16.abc sep5x2\
	General_Guinness/General_Guinness-C-16-1.abc \
	General_Guinness/General_Guinness-D-16-1.abc \
	General_Guinness/General_Guinness-F-16-1.abc \
	General_Guinness/General_Guinness-G-16-1.abc \
	ftr/General_Guinness.ftr
General_Guinness: General_Guinness.abc General_Guinness.pdf
General_Guinness.abc: $(General_Guinness); abcjoin $(General_Guinness) >General_Guinness.abc
	ln -f General_Guinness.abc song/General_Guinness-G-16-4wW.abc
General_Guinness.ps: General_Guinness.abc fmt/General_Guinness.fmt
	$(a2p) General_Guinness.abc +Ffmt/General_Guinness.fmt  \
	|PShdr "General Guinness" "" "General Guinness"  \
	|PSftr %D $U/ %D >General_Guinness.ps
General_Guinness.pdf: General_Guinness.ps; ps2pdf General_Guinness.ps
	ln -f General_Guinness.pdf img/General_Guinness.pdf
hdr/General_Guinness.hdr: ; touch hdr/General_Guinness.hdr
ftr/General_Guinness.ftr: ; touch ftr/General_Guinness.ftr

# Judy's Reel + Father Kelly's Reel
Judys_FatherKellys= hdr/Judys_FatherKellys.hdr reel/Judys_Reel-D-32-4.abc reel/Father_Kelleys_Reel-G-32-4.abc
Judys_FatherKellys: Judys_FatherKellys.abc Judys_FatherKellys.pdf
Judys_FatherKellys.abc: $(Judys_FatherKellys) hdr/Judys_FatherKellys.hdr
	abcjoin +CRS2 $(Judys_FatherKellys) >Judys_FatherKellys.abc
Judys_FatherKellys.ps: Judys_FatherKellys.abc fmt/_80.fmt
	$(a2p) Judys_FatherKellys.abc +Ffmt/_80.fmt \
	|PShdr Judys_FatherKellys '' Judys_FatherKellys \
	|PSftr %D $U/ %D >Judys_FatherKellys.ps
Judys_FatherKellys.pdf: Judys_FatherKellys.ps
	ps2pdf Judys_FatherKellys.ps Judys_FatherKellys.pdf

# Londonderry_Air
Londonderry_Air= air/Londonderry_Air_JRoss_3V-Eb-16-4.abc air/Londonderry_Air_JRoss_3V-F-16-4.abc Londonderry_Air_G
Londonderry_Air: Londonderry_Air.abc Londonderry_Air.pdf
Londonderry_Air.abc: $(Londonderry_Air) # hdr/Londonderry_Air.hdr
	abcjoin +s $(Londonderry_Air) >Londonderry_Air.abc
Londonderry_Air.ps: Londonderry_Air.abc fmt/_65.fmt
	abcm2ps  Londonderry_Air.abc -F fmt/_65.fmt -O tmp.ps
	 PShdr Londonderry_Air "" Londonderry_Air <tmp.ps \
	|PSftr %D $U %D >Londonderry_Air.ps
	rm tmp.ps
Londonderry_Air.pdf: Londonderry_Air.ps
	ps2pdf Londonderry_Air.ps

# Londonderry_Air_G
Londonderry_Air_G= air/Londonderry_Air_JRoss_3V-G-16-4.abc
Londonderry_Air_G: Londonderry_Air_G.abc Londonderry_Air_G.pdf
Londonderry_Air_G.abc: $(Londonderry_Air_G) # hdr/Londonderry_Air_G.hdr
	abcjoin +s $(Londonderry_Air_G) >Londonderry_Air_G.abc
Londonderry_Air_G.ps: Londonderry_Air_G.abc fmt/_80.fmt
	abcm2ps  Londonderry_Air_G.abc -F fmt/_80.fmt -O tmp.ps
	 PShdr Londonderry_Air_G "" Londonderry_Air_G <tmp.ps \
	|PSftr %D $U %D >Londonderry_Air_G.ps
	rm tmp.ps
Londonderry_Air_G.pdf: Londonderry_Air_G.ps
	ps2pdf Londonderry_Air_G.ps

# Long Note
LongNote= jig/LongNote_D.abc reel/LongNoteR_D.abc
LongNote: LongNote.abc LongNote.pdf
LongNote.abc: $(LongNote) # hdr/LongNote.hdr
	abcjoin +s $(LongNote) >LongNote.abc
LongNote.ps: LongNote.abc fmt/_75.fmt
	$(a2p) +c LongNote.abc +Ffmt/_75 \
	|PShdr LongNote "" LongNote \
	|PSftr %D $U %D >LongNote.ps
LongNote.pdf: LongNote.ps
	ps2pdf LongNote.ps

# Morgan Magan
MorganMagan= misc/MorganMagan_D.abc misc/MorganMagan_G.abc
MorganMagan: MorganMagan.abc MorganMagan.pdf
MorganMagan.abc: $(MorganMagan) # hdr/MorganMagan.hdr
	abcjoin +s $(MorganMagan) >MorganMagan.abc
MorganMagan.ps: MorganMagan.abc fmt/_75.fmt
	$(a2p) MorganMagan.abc +Ffmt/_75 \
	|PShdr MorganMagan "" MorganMagan \
	|PSftr %D $U %D >MorganMagan.ps
MorganMagan.pdf: MorganMagan.ps
	ps2pdf MorganMagan.ps

# Nation Once Again, A
Nation_Once_Again= song/Nation_Once_Again-G-24-0W.abc ftr/Nation_Once_Again.ftr
Nation_Once_Again: Nation_Once_Again.abc Nation_Once_Again.pdf
Nation_Once_Again.abc: $(Nation_Once_Again) # hdr/Nation_Once_Again.hdr
	abcjoin +s $(Nation_Once_Again) >Nation_Once_Again.abc
Nation_Once_Again.ps: Nation_Once_Again.abc fmt/_90.fmt
	$(a2p) +c Nation_Once_Again.abc +Ffmt/_90.fmt |\
	PShdr 'A Nation Once Again' "" 'A Nation Once Again' |\
	PSftr %D $U %D >Nation_Once_Again.ps
Nation_Once_Again.pdf: Nation_Once_Again.ps
	ps2pdf Nation_Once_Again.ps
	Ln.sh Nation_Once_Again.pdf img/

# Salamanca Reel
SalamancaReel= reel/SalamancaReel1_D.abc reel/SalamancaReel2_D.abc reel/SalamancaReel3_D.abc
SalamancaReel: SalamancaReel.abc SalamancaReel.pdf
SalamancaReel.abc: $(SalamancaReel) # hdr/SalamancaReel.hdr
	abcjoin +s $(SalamancaReel) >SalamancaReel.abc
SalamancaReel.ps: SalamancaReel.abc fmt/_75.fmt
	$(a2p) SalamancaReel.abc +Ffmt/_75 \
	|PShdr SalamancaR "" SalamancaR \
	|PSftr %D $U %D >SalamancaReel.ps
SalamancaReel.pdf: SalamancaReel.ps
	ps2pdf SalamancaReel.ps

# Silver Spire
SilverSpire= reel/Silver_Spire_1_DM.abc reel/Silver_Spire_2_JC.abc reel/Silver_Spire_3_JC.abc reel/Silver_Spire_4_RJ.abc
SilverSpire: SilverSpire.abc SilverSpire.pdf
SilverSpire.abc: $(SilverSpire) # hdr/SilverSpire.hdr
	abcjoin +rs $(SilverSpire) >SilverSpire.abc
SilverSpire.ps: SilverSpire.abc fmt/_70.fmt
	$(a2p) SilverSpire.abc +Ffmt/_70 \
	|PShdr SilverR "" SilverR \
	|PSftr %D $U %D >SilverSpire.ps
SilverSpire.pdf: SilverSpire.ps
	ps2pdf SilverSpire.ps


# PigeonOnTheGate
PigeonOnTheGate= \
	reel/PigeonOnTheGate1_Em.abc \
	reel/PigeonOnTheGate2_G.abc \
	reel/PigeonOnTheGate3_A.abc \
	reel/PigeonOnTheGate4_Gm.abc reel/PigeonOnTheGate4_Em.abc \
	reel/PigeonOnTheGate5_Em.abc \
	reel/PigeonOnTheGate6_G.abc
PigeonOnTheGate: PigeonOnTheGate.abc PigeonOnTheGate.pdf
PigeonOnTheGate.abc: $(PigeonOnTheGate) # hdr/PigeonOnTheGate.hdr
	abcjoin +s $(PigeonOnTheGate) >PigeonOnTheGate.abc
PigeonOnTheGate.ps: PigeonOnTheGate.abc fmt/_70.fmt
	$(a2p) PigeonOnTheGate.abc +Ffmt/_70 \
	|PShdr PigeonOnTheGate "" PigeonOnTheGate \
	|PSftr %D $U %D >PigeonOnTheGate.ps
PigeonOnTheGate.pdf: PigeonOnTheGate.ps
	ps2pdf PigeonOnTheGate.ps

# Wild Rover
Wild_Rover= song/Wild_Rover-C-34-.abc song/Wild_Rover-G-34-.abc
Wild_Rover: Wild_Rover.abc Wild_Rover.pdf
Wild_Rover.abc: $(Wild_Rover) # hdr/Wild_Rover.hdr
	abcjoin +C +s $(Wild_Rover) >Wild_Rover.abc
Wild_Rover.ps: Wild_Rover.abc fmt/Wild_Rover.fmt
	$(a2p) Wild_Rover.abc +Ffmt/Wild_Rover \
	|PShdr WildRover "" WildRover \
	|PSftr %D $U %D >Wild_Rover.ps
Wild_Rover.pdf: Wild_Rover.ps
	ps2pdf Wild_Rover.ps

