lilypond-user
[Top][All Lists]
Advanced

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

Re: lilypond-book with multi-dir projects


From: Graham Percival
Subject: Re: lilypond-book with multi-dir projects
Date: Tue, 4 Mar 2008 21:06:35 -0800

On Sat, 1 Mar 2008 00:23:37 -0600
"Daniel Tonda" <address@hidden> wrote:

> lilypond-book --pdf -o OUT Master.tex
> will leave all the lily*.pdf and semi-compiled output in the OUT
> directory, then you can cd to the OUT directory and do:
 
After much investigation, this looks like the best solution after
all... although I need to play more games on the TeX side of
things.

For the curious, here's my makefile for my chapter subdirs:
# -I is to work around a bug in lilypond-book 2.11.41
LYFLAGS= --pdf --out $(BUILDDIR) -I $(BUILDDIR)
#LYFLAGS= --pdf -I /tmp --out /tmp --process='lilypond -I
ly-preamble.ly'

all:
        lilypond-book $(LYFLAGS) *.lytex



and here's the main makefile:
FILE=masters-percival

XPDF=xpdf $(BUILDDIR)/$(FILE).pdf
OPEN=open $(BUILDDIR)/$(FILE).pdf
BUILDDIR=/tmp/thesis
SOURCEDIR=$(HOME)/docs/thesis/
PDF=TEXINPUTS=$(BUILDDIR):.: pdflatex -output-directory
$(BUILDDIR) $(FILE)
BIB=cd $(BUILDDIR) && BIBINPUTS=$(SOURCEDIR) bibtex $(FILE)

SUBDIRS = intro
#exercises transcription grading meaws

all: build show

build:
        mkdir -p $(BUILDDIR)
        for dir in $(SUBDIRS); do (cd $$dir; make
BUILDDIR=$(BUILDDIR)); done
        $(PDF)
        $(BIB)
        $(PDF)
        $(PDF)

show:
ifdef DISPLAY
        $(XPDF)
else
        $(OPEN)
endif

keep: all
        cp $(BUILDDIR)/$(FILE).pdf $(SOURCEDIR)

clean:
        rm -rf $(BUILDDIR)


Cheers,
- Graham




reply via email to

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