Skip to content

Instantly share code, notes, and snippets.

@aviafelix
Created September 29, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviafelix/8119114be75a49c557e0 to your computer and use it in GitHub Desktop.
Save aviafelix/8119114be75a49c557e0 to your computer and use it in GitHub Desktop.
Makefile example for LilyPond
SRC = a4.ly tenor1.ly tenor2.ly bass1.ly bass2.ly lyrics.ly header.ly ../lib/paper.ly
RESULT = a4.pdf all.midi
DIRNAME = $(realpath .)
.PHONY: preview publish archive dist play view help
preview pre view $(RESULT): $(SRC)
lilypond a4.ly
mv -f a4.midi all.midi
see a4.pdf &
publish pub a4.publish.pdf: $(SRC)
lilypond -dno-point-and-click -o a4.publish a4.ly
mv -f a4.publish.midi all.midi
dist: $(SRC) a4.publish.pdf
7z a -tzip -mx=9 $(DIRNAME).zip $(SRC) a4.publish.pdf all.midi Makefile
clean:
rm -f *~ $(RESULT) a4.publish.pdf a4.ps a4.publish.ps
play: all.midi
timidity all.midi
help:
@echo Available goals:
@echo ' preview - create and show PDF preview with debug info, make MIDI file'
@echo ' publish - create final PDF file without debug info, make MIDI file'
@echo ' play - play MIDI file'
@echo ' dist - create archive with sources and result'
@echo ' clean - delete result and backup files'
@echo ' help - show this message'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment