summaryrefslogtreecommitdiff
path: root/Prost/Makefile
blob: 93067fb602101a6108623d88cc367ca57c38b34c (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
CURDOC=$(shell basename "$(CURDIR)")

DIRS=../Geh_aus_mein_Herz ../In_dieser_lieben_Sommerzeit

EXTRAS=-mit-Texthinweisen

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

print:
	@echo $(CURDOC)$(EXTRAS).pdf

clean:
	rm -f *.pre *.post

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

include ../.meta/*.mk

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

Geh_aus_mein_Herz_%.pre: ../Geh_aus_mein_Herz/%.ly
	cat "$<" > "$@"

In_dieser_lieben_Sommerzeit_%.pre: ../In_dieser_lieben_Sommerzeit/%.ly
	cat "$<" > "$@"

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

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