summaryrefslogtreecommitdiff
path: root/Still/Makefile
blob: 0d2ab776b320321a338b8649383e2b2bb052264e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
CURDOC=$(shell basename "$(CURDIR)")

EXTRAS=$(shell ../.meta/find-extras)

all: $(CURDOC)$(EXTRAS).pdf $(CURDOC)$(EXTRAS)-tolino.pdf

clean:
	rm -f *.pre *.post

Clean: clean
	rm -f *.pdf *.midi

include ../.meta/*.mk

%.pre: %.ly
	cat "$<" > "$@"

%.post: %.pre $(patsubst %.ly,%.pre, $(shell find . -name '*.ly')) ../.meta/header.ly
	cat ../.meta/header.ly "$<" \
	|m4 \
	>"$@"

%.pdf: %.post
	lilypond $<
	pkill -SIGHUP -xf "mupdf(-x11)? $@" || true

%-midi.midi: %-midi.post
	lilypond $<

%.midi: %-midi.midi
	mv $< $@