Whitespace fixes in the templates
[orchestrallily.git] / Templates / EK_Full / Makefile
blobde9111b2bb78e98e20ecceae60963d941e3b572d
1 OUT=out
3 <$ for w in works -$>
4 base<< w.nr >> = << w.basename >>
5 SRCS<< w.nr >> = << w.srcfiles.settings|join (" ") >> << w.srcfiles.parts|join (" ") >> $(base)_Settings.ily
6 instruments<< w.nr >> = << w.instruments|join (" ") >>
7 scores<< w.nr >> = << w.scores|join (" ") >>
8 pdfs<< w.nr >> = $(instruments<<w.nr>>:%=$(OUT)/$(base<<w.nr>>)_Instrument_%.pdf) \
9 $(scores<<w.nr>>:%%=$(OUT)/$(base<<w.nr>>)_Score_%.pdf)
11 <$ endfor $>
12 <$ if latex -$>
13 texbase = << latex.basename >>
14 texscores = << latex.scores|join (" ") >>
15 texs = $(texscores:%=TeX_$(texbase)_Score_%.tex)
16 texpdfs = $(texs:%.tex=$(OUT)/%.pdf) \
17 $(OUT)/TeX_$(texbase)_Score_Instruments.pdf
18 <$ endif $>
20 <$ set jj = joiner(" ") -$>
21 additionalscores = <$ for s in additionalscores $><< jj() >>$(OUT)/<< s >>.pdf<$ endfor $>
23 .PHONY: all clean
24 all: $(OUT)<$ for w in works $> $(instruments<< w.nr >>) $(scores<< w.nr >>)<$ endfor $> $(additionalscores)<$ if latex $> tex<$ endif $>
25 <$ for w in works -$>
26 instruments<<w.nr>>: $(instruments<<w.nr>>)
27 scores<<w.nr>>: $(scores<<w.nr>>)
28 <$ endfor $>
30 clean:
31 rm -rf $(OUT)
33 lily: <$ for w in works $>$(pdfs<< w.nr >>) <$ endfor $>$(additionalscores)
35 $(OUT) :
36 mkdir -p $(OUT)
38 <$ for w in works -$>
39 $(instruments<< w.nr >>): % : $(OUT)/$(base<< w.nr >>)_Instrument_%.pdf $(SRCS<< w.nr >>)
40 $(scores<< w.nr >>): % : $(OUT)/$(base<< w.nr >>)_Score_%.pdf $(SRCS<< w.nr >>)
41 <$ endfor $>
43 $(OUT)/%.pdf : %.ly
44 lilypond -o $(basename $@) $<
46 $(OUT)/%.mp3 : %.midi
47 timidity -c /etc/timidity/fluidr3_gm.cfg -OwM $< -o $@
49 $(additionalscores): $(OUT)/%.pdf: %.ly
50 lilypond -dbackend=eps -o $(basename $@) $<
52 <$ if latex -$>
53 tex: $(additionalscores) latex
54 latex: <$ for w in works $>$(pdfs<< w.nr >>) <$ endfor $>$(texpdfs)
55 latexpdf: $(texpdfs)
57 $(OUT)/TeX_%.pdf : TeX_%.tex
58 TEXINPUTS=$(OUT):orchestrallily/:.//: latex --output-directory=$(OUT)/ $<
59 <$ endif $>