summaryrefslogtreecommitdiff
path: root/Ich_glaub_an_einen_Gott_der_singt/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Ich_glaub_an_einen_Gott_der_singt/Makefile')
-rw-r--r--Ich_glaub_an_einen_Gott_der_singt/Makefile31
1 files changed, 23 insertions, 8 deletions
diff --git a/Ich_glaub_an_einen_Gott_der_singt/Makefile b/Ich_glaub_an_einen_Gott_der_singt/Makefile
index d77f888..9a5f07f 100644
--- a/Ich_glaub_an_einen_Gott_der_singt/Makefile
+++ b/Ich_glaub_an_einen_Gott_der_singt/Makefile
@@ -1,16 +1,17 @@
CURDOC=$(shell basename "$(CURDIR)")
+STROPHEN=[^%]
+VARIANTE=1
-ifeq ($(FUER),ewe)
- SPEZIFISCH=\#(set! paper-alist (cons '(\"kindle\" . (cons (* 210 mm) (* 130 mm))) paper-alist))\n\#(set-default-paper-size \"kindle\")
+ifeq ($(MIDI),1)
+ MIDI_REGEX=
else
- SPEZIFISCH=
- # \#(set-global-staff-size 14)
+ MIDI_REGEX=/\\\\midi/{ :a; s/\\\\midi[^{}]*{/\\\\midi/; tb; N; ba; :b; s/{[^{}]*}//; tb; s/\\\\midi[^{}]*}//; t; N; bb; };
endif
-ifeq ($(MIDI),1)
- MIDI_REGEX=
+ifeq ($(KLAVIER),1)
+ KLAVIER_REGEX=
else
- MIDI_REGEX=/\\\\midi/{ :a; s/\\\\midi[^{}]*{/\\\\midi/; tb; N; ba; :b; s/{[^{}]*}//; tb; s/\\\\midi[^{}]*}//; t; N; bb; }
+ KLAVIER_REGEX=/%Klavier%/d;
endif
all: $(CURDOC).pdf
@@ -25,8 +26,22 @@ Clean: clean
%.pre: %.ly
sed " \
s@%spezifisch%@$(SPEZIFISCH)@ ; \
+ s/%STR_\($(STROPHEN)\)%//g; \
+ s/%Variante_$(VARIANTE)%//; \
+ $(KLAVIER_REGEX) \
$(MIDI_REGEX) \
" "$<" > "$@"
-%.pdf: %.pre *.ly
+$(CURDOC).meta: $(CURDOC)-plain.meta
+ cat "$<" >"$@"
+
+$(CURDOC)-%.meta: ../.meta/%.meta $(CURDOC).pre
+ sed " \
+ 1 i define(input,$(CURDOC).pre) \
+ " "$<" \
+ | m4 \
+ >"$@"
+
+%.pdf: %.meta stimmen.pre texte.pre
lilypond $<
+ pkill -SIGHUP -xf "mupdf $@" || true