Il giorno mer 21 set 2016 alle 14:49, tapani <simoj...@yahoo.com> 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




_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to