lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilypond-book: Processing multiple lytex files with a single command


From: Federico Bruni
Subject: Re: lilypond-book: Processing multiple lytex files with a single command
Date: Wed, 21 Sep 2016 16:00:30 +0200

Il giorno mer 21 set 2016 alle 14:49, tapani <address@hidden> ha scritto:
I need to process several dozen lytex files at once for a single project (on Ubuntu). Is there a way of processing every lytex file in a given location with a single command, rather than having to compile each one separately?

[I read somewhere about using a makefile, but I failed to understand it
sufficiently to apply it.]

Any help would be very much appreciated!

Hey Tapani

Yes, makefile is a good way to go.
I started using it in the last weeks and I think it's very very useful with LilyPond. I've been wanting to try to improve the doc about Makefile but didn't find the time to study it a bit more and try a patch.

Basically you'll have to do something like this (replace "[TAB] " with a real TAB character):

# Rule to compile any .ly file to PDF and MIDI
# The pattern is "output: input". I'll use % (same as * in bash), to catch all files ending with...
# $< is the input file
#
%.pdf, %.midi: %.ly
[TAB] lilypond $<

# Rule to build a lilypond-book file
mybook.pdf: mybook.lytex
[TAB] lilypond-book OPTIONS... $<

# Targets
book: mybook.pdf

clean:
[TAB] rm *.pdf *.midi






reply via email to

[Prev in Thread] Current Thread [Next in Thread]