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 $< $@