summaryrefslogtreecommitdiff
path: root/O_du_froehliche/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'O_du_froehliche/Makefile')
-rw-r--r--O_du_froehliche/Makefile36
1 files changed, 9 insertions, 27 deletions
diff --git a/O_du_froehliche/Makefile b/O_du_froehliche/Makefile
index ffc635a..cb66cc7 100644
--- a/O_du_froehliche/Makefile
+++ b/O_du_froehliche/Makefile
@@ -1,25 +1,6 @@
CURDOC=$(shell basename "$(CURDIR)")
-ifeq ($(FUER),ewe)
- SPEZIFISCH=\#(set! paper-alist (cons '(\"kindle\" . (cons (* 210 mm) (* 130 mm))) paper-alist))\n\#(set-default-paper-size \"kindle\")
-else
- SPEZIFISCH=
- # \#(set-global-staff-size 14)
-endif
-
-ifeq ($(KLAVIER),1)
- KLAVIER_REGEX=s/%Klavier%//
-else
- KLAVIER_REGEX=/%Klavier%/d;
-endif
-
-ifeq ($(OBERSTIMME),1)
- OBERSTIMMEN_REGEX=s/%Oberstimme%//
-else
- OBERSTIMMEN_REGEX=/%Oberstimme%/d;
-endif
-
-all: $(CURDOC).pdf $(CURDOC).midi
+all: $(CURDOC).pdf
pkill -SIGHUP -xf 'mupdf(-x11)? (.*/)?$<' || true
clean:
@@ -28,13 +9,14 @@ clean:
Clean: clean
rm -f *.pdf *.midi
+include ../.meta/*.mk
+
%.pre: %.ly
- sed " \
- s@%spezifisch%@$(SPEZIFISCH)@ ; \
- $(OBERSTIMMEN_REGEX); \
- $(KLAVIER_REGEX) \
- " "$<" > "$@"
+ cat "$<" > "$@"
-%.pdf %.midi: %.pre *.ly
- lilypond $<
+%.post: %.pre $(patsubst %.ly,%.pre, $(shell ls *.ly))
+ m4 <"$<" >"$@"
+%.pdf: %.post
+ lilypond $<
+ pkill -SIGHUP -xf "mupdf $@" || true