lilypond-user
[Top][All Lists]
Advanced

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

Re: master file in emacs lilypond mode


From: Henrik Frisk
Subject: Re: master file in emacs lilypond mode
Date: Fri, 08 Jun 2007 13:29:36 +0200

address@hidden wrote:

> > I'm working on a piece where what I'm editing is the include files,
> > but what I want to run lilypond on is a master file.  I've been
> > enjoying just saying "C-c C-l" to run lilypond, but I can't figure out
> > how to tell lilypond what the master file is.  

> But why don't you use a Makefile instead?

Hi Laura,

Here's an example Makefile that I use. Feel free to do what you want
with it! Basically, you put all your include .ly files in the SOURCES
variable and your main file in the MAIN_LY variable. Then, in emacs, run
M-x compile and run 'make [optional args] prepare'. Also you may change
the location of your binaries depending on your system. Let me know of
any questions you may have.

HOME = ./
OUT_DIR = $(HOME)out/
LILY = /usr/bin/lilypond
LILYARGS = -dno-point-and-click
LILYBOOK = /sw/bin/lilypond-book
TEX = /usr/bin/latex
DVIPS = /usr/bin/dvips
VIEWER = /usr/bin/gv --watch
PS2PDF = /usr/bin/ps2pdf
DVIPS_ARGS =  -o -Ppdf -h 
LILYBOOK_ARGS =  --output=$(OUT_DIR) --psfonts
PRINTER = -PMHM-X200 -o PageSize=A4,Duplex=DuplexNoTumble
MAIN_LY = score.ly
SOURCES = sixstrings.chords.guit1.ly \
        sixstrings.chords.guit2.ly \
        sixstrings.chords.guit1-2.ly \
        sixstrings.chords.guit2-2.ly \
        $(MAIN_LY)

nomenclatura : $(HOME)nomenclatura.tex
        $(LILYBOOK) $(LILYBOOK_ARGS) $<
        cd $(OUT_DIR); \
        $(TEX) $@
        cd $(OUT_DIR); \
        $(DVIPS) $(DVIPS_ARGS)address@hidden $@
        cd $(OUT_DIR); \
        $(PS2PDF) address@hidden

score : repetition.music.ly $(MAIN_LY)
        $(LILY) $@
        $(VIEWER) address@hidden

print : prepare
        lpr $(PRINTER) score.pdf

view : prepare
        $(VIEWER) $(OUT_DIR)nomenclatura.ps

prepare : $(SOURCES)
        $(LILY) $(LILYARGS) $(MAIN_LY)

prepareEPS : $(SOURCES)
        $(LILY) $(LILYARGS) --backend=eps $(MAIN_LY)

preparePS : $(SOURCES)
        $(LILY) $(LILYARGS) --backend=ps $(MAIN_LY)

preview : 
        $(LILY) $(LILYARGS) --preview $(MAIN_LY)

prepareSVG: $(SOURCES)
        $(LILY) $(LILYARGS) --backend=svg $(MAIN_LY)

reply via email to

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