Here's a modified version of Tim's Makefile which 
uses the --outdir flag of lilypond-book to keep
all temporary files in a separate directory.
This makes the 'make clean' more or less fool-proof
and keeps the current directory free from temporary
files.

If I remember correctly, the default of lilypond-book
was to put the output in a separate directory, in the 
early Lilypond versions. However, we got so many 
questions on why it didn't produce any output that we
decided to change to the current behaviour.

    /Mats

OUTDIR=out/

all:    fullbook

lilypond:
        lilypond-book --outdir=$OUTDIR Book.mb 2>&1

tex: lilypond
        cd $OUTDIR
        latex \\nonstopmode \\input Book.latex

book: tex
        cd $OUTDIR
        dvips Book.dvi -o Book.ps

fullbook: index book psconvert

psconvert:
        cd $OUTDIR
        psbook Book.ps Book2.ps
        pstops '2:0L(11.45in,0.25in)+1L(11.45in,5.6in)' Book2.ps Book3.ps

index:
        cd $OUTDIR
        makeindicies

clean:
        rm $OUTDIR/*

Reply via email to