summaryrefslogtreecommitdiff
path: root/Schuetz_Singet_dem_Herrn_CIS/Makefile
blob: ff3ee4e6d2d75bf647c84daa293b6683c32eb77c (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
32
33
34
35
36
37
CURDOC=$(shell basename "$(CURDIR)")

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

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

print:
	@echo $(CURDOC)$(EXTRAS).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.post
	lilypond $<
	for s in *-midi*.midi; do \
	  mv "$$s" "$${s%-midi*.midi}$${s##*-midi}"; \
	done

%.wav: %.midi
	fluidsynth --audio-driver=file -o audio.file.name=$@ -i $<