lilypond-devel
[Top][All Lists]
Advanced

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

Re: DOCS: revising LM "Score and Parts"


From: Jonathan Kulp
Subject: Re: DOCS: revising LM "Score and Parts"
Date: Mon, 25 May 2009 13:19:58 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Werner LEMBERG wrote:
I've made some progress.  When I try to run "make score" on Windows
XP,

As it stands, the Makefile doesn't work with Windows.  For
documentation purposes I strongly suggest to cook up a special
Windows Makefile with the same functionality.


Yes, this will be my new strategy. I've set up a Windows 7 virtual machine on my laptop to work on it. However if anyone who uses Windows and understands how to use Makefiles on it would be willing to adapt the Makefile I'd be most grateful. I'm learning all of the Windows stuff from scratch and it's extremely tedious and probably not worth my trouble since I don't ever plan to use Windows except to test the occasional Lilypond issue.

   %.pdf %.midi: %.ly
        $(LILY_CMD) $<; \
        if test -f "$*.pdf"; then \
          mv "$*.pdf" PDF/; \
        fi; \
        if test -f "$*.midi"; then \
          mv "$*.midi" MIDI/; \
        fi

Now, the full score compiles if I change the score target to this:

   score:
        $(LILY_CMD) Scores/$(piece).ly

So it looks like the Windows environment doesn't know how to deal
with the pattern rule defined at the top of the Makefile.

If nothing compiles then the Makefile doesn't find the *.ly files in
the `Score' subdirectory.  This means that the VPATH settings don't
work.  Do you use the `CURDIR' variable in the VPATH path elements?

BTW, you can see the exact make rules with

make -r -R -p Makefile

Yes, I use the CURDIR variable in the VPATH elements:

VPATH = \
  $(CURDIR)/Scores \
  $(CURDIR)/PDF \
  $(CURDIR)/Parts \
  $(CURDIR)/Notes

I'm copying the whole Makefile below in case anyone would like to try it on Windows. The tarball of the Stamitz symphony source files is available here:

http://music2.louisiana.edu/Gratis/

Thanks,

Jon
--
Jonathan Kulp
http://www.jonathankulp.com

########

# the name stem of the output files
piece = stamitz
CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//`
# The command to run lilypond
LILY_CMD = lilypond -ddelete-intermediate-files \
                    -dno-point-and-click -djob-count=$(CPU_CORES)

# The suffixes used in this Makefile.
.SUFFIXES: .ly .ily .pdf .midi

# Input and output files are searched in the directories listened in
# the VPATH variable.  All of them are subdirectories of the current
# directory (given by the GNU make variable `CURDIR').
VPATH = \
  $(CURDIR)/Scores \
  $(CURDIR)/PDF \
  $(CURDIR)/Parts \
  $(CURDIR)/Notes

# The pattern rule to create PDF and MIDI files from a LY input file.
# The .pdf output files are created in the `PDF' subdirectory, and the
# .midi files are put into the `MIDI' subdirectory.
%.pdf %.midi: %.ly
        $(LILY_CMD) $<; \
        if test -f "$*.pdf"; then \
          mv "$*.pdf" PDF/; \
        fi; \
        if test -f "$*.midi"; then \
          mv "$*.midi" MIDI/; \
        fi

notes = \
  cello.ily \
  figures.ily \
  horn.ily \
  oboe.ily \
  trioString.ily \
  viola.ily \
  violinOne.ily \
  violinTwo.ily

# The dependencies of the movements.
$(piece)I.pdf: $(piece)I.ly $(notes)
$(piece)II.pdf: $(piece)II.ly $(notes)
$(piece)III.pdf: $(piece)III.ly $(notes)
$(piece)IV.pdf: $(piece)IV.ly $(notes)

# The dependencies of the full score.
$(piece).pdf: $(piece).ly $(notes)

# The dependencies of the parts.
$(piece)-cello.pdf: $(piece)-cello.ly cello.ily \
                    figures.ily \
                    trioString.ily
$(piece)-horn.pdf: $(piece)-horn.ly horn.ily
$(piece)-oboes.pdf: $(piece)-oboes.ly oboe.ily
$(piece)-viola.pdf: $(piece)-viola.ly viola.ily
$(piece)-violinOne.pdf: $(piece)-violinOne.ly violinOne.ily
$(piece)-violinTwo.pdf: $(piece)-violinTwo.ly violinTwo.ily

# Say `make score' to generate the full score of all four
# movements as one file.
.PHONY: score
score: $(piece).pdf

# Say `make parts' to generate all parts.
# Say `make foo.pdf' to generate the part for instrument `foo'.
# Example: `make cello.pdf'.
.PHONY: parts
parts: $(piece)-cello.pdf \
       $(piece)-violinOne.pdf \
       $(piece)-violinTwo.pdf \
       $(piece)-viola.pdf \
       $(piece)-oboes.pdf \
       $(piece)-horn.pdf

# Say `make movements' to generate files for the
# four movements separately.
.PHONY: movements
movements: $(piece)I.pdf \
           $(piece)II.pdf \
           $(piece)III.pdf \
           $(piece)IV.pdf

all: score parts movements

archive:
        tar -cvvf stamitz.tar \
        --exclude=*pdf --exclude=*~ \
  --exclude=*midi --exclude=*.tar \
        ../Stamitz/*




reply via email to

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