Hi Jacques,

I've attached my makefile. You can compare it to pp. 50-52 of the Lilypond
"Usage" manual, which is what I adapted it from. Any advice would be much
appreciated.

Craig


On Thu Jan 01 2015 at 12:29:28 AM Jacques Menu <imj-muz...@bluewin.ch>
wrote:

> Hello Craig,
>
> Tabs play an important role in makefiles, and the bullets on the first two
> lines are suspect to me. Maybe an effect of copying into your E-Mail
> message.
>
> Can you supply as attachments the original and modified makefiles? The
> result of « diff originalOne yours » will be instructive.
>
> JM
>
> Le 31 déc. 2014 à 00:27, Craig Dabelstein <craig.dabelst...@gmail.com> a
> écrit :
>
> Hi all,
>
> Does anyone have experience with using makefiles?
>
> I've adapted the example from the usage documentation but I keep getting
> errors, such as *** No rule to make target `score'
>
> Any help or tips would be greatly appreciated.
>
> Craig
>
>
>
>    - piece = symphony2
>    - CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//`
>
> LILY_CMD = lilypond -ddelete-intermediate-files \
>
>                       -dno-point-and-click -djob-count=$(CPU_CORES)
>
> .SUFFIXES: .ly .ily .pdf .midi
>
> # Input and output files are searched in the directories listed in
>
> # the VPATH variable.  All of them are subdirectories of the current
>
> # directory (given by the GNU make variable `CURDIR').
>
> #CURDIR = $(shell pwd)
>
> 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 put into the `PDF' subdirectory, and the
>
> # .midi files go 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 = \
>
> fluteOne.ily \
>
> fluteTwo.ily \
>
> oboeOne.ily \
>
> oboeTwo.ily \
>
> clarinetOne.ily \
>
> clarinetTwo.ily \
>
> clarinetThree.ily \
>
> bassclarinet.ily \
>
> bassoonOne.ily \
>
> bassoonTwo.ily \
>
> altosaxOne.ily \
>
> altosaxTwo.ily \
>
> tenorsax.ily \
>
> barisax.ily \
>
> hornOne.ily \
>
> hornTwo.ily \
>
> hornThree.ily \
>
> hornFour.ily \
>
> trumpetOne.ily \
>
> trumpetTwo.ily \
>
> trumpetThree.ily \
>
> tromboneOne.ily \
>
> tromboneTwo.ily \
>
> tromboneThree.ily \
>
> euphoniumOne.ily \
>
> euphoniumTwo.ily \
>
> tuba.ily \
>
> timpani.ily \
>
> snardrum.ily \
>
> bassdrum.ily \
>
> cymbals.ily \
>
> tamtam.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)
>
> $(piece)V.pdf: $(piece)V.ly $(notes)
>
>
> # The dependencies of the full score.
>
> $(piece).pdf: $(piece).ly $(notes)
>
>
> # The dependencies of the parts.
>
> $(piece)-fluteOne.pdf: $(piece)-fluteOne.ly fluteOne.ily
>
> $(piece)-fluteTwo.pdf: $(piece)-fluteTwo.ly fluteTwo.ily
>
> $(piece)-oboeOne.pdf: $(piece)-oboeOne.ly oboeOne.ily
>
> $(piece)-oboeTwo.pdf: $(piece)-oboeTwo.ly oboeTwo.ily
>
> $(piece)-clarinetOne.pdf: $(piece)-clarinetOne.ly clarinetOne.ily
>
> $(piece)-clarinetTwo.pdf: $(piece)-clarinetTwo.ly clarinetTwo.ily
>
> $(piece)-clarinetThree.pdf: $(piece)-clarinetThree.ly clarinetThree.ily
>
> $(piece)-bassclarinet.pdf: $(piece)-bassclarinet.ly bassclarinet.ily
>
> $(piece)-bassoonOne.pdf: $(piece)-bassoonOne.ly bassoonOne.ily
>
> $(piece)-bassoonTwo.pdf: $(piece)-bassoonTwo.ly bassoonTwo.ily
>
> $(piece)-altosaxOne.pdf: $(piece)-altosaxOne.ly altosaxOne.ily
>
> $(piece)-altosaxTwo.pdf: $(piece)-altosaxTwo.ly altosaxTwo.ily
>
> $(piece)-tenorsax.pdf: $(piece)-tenorsax.ly tenorsax.ily
>
> $(piece)-barisax.pdf: $(piece)-barisax.ly barisax.ily
>
> $(piece)-hornOne.pdf: $(piece)-hornOne.ly hornOne.ily
>
> $(piece)-hornTwo.pdf: $(piece)-hornTwo.ly hornTwo.ily
>
> $(piece)-hornThree.pdf: $(piece)-hornThree.ly hornThree.ily
>
> $(piece)-hornFour.pdf: $(piece)-hornFour.ly hornFour.ily
>
> $(piece)-trumpetOne.pdf: $(piece)-trumpetOne.ly trumpetOne.ily
>
> $(piece)-trumpetTwo.pdf: $(piece)-trumpetTwo.ly trumpetTwo.ily
>
> $(piece)-trumpetThree.pdf: $(piece)-trumpetThree.ly trumpetThree.ily
>
> $(piece)-tromboneOne.pdf: $(piece)-tromboneOne.ly tromboneOne.ily
>
> $(piece)-tromboneTwo.pdf: $(piece)-tromboneTwo.ly tromboneTwo.ily
>
> $(piece)-tromboneThree.pdf: $(piece)-tromboneThree.ly tromboneThree.ily
>
> $(piece)-euphoniumOne.pdf: $(piece)-euphoniumOne.ly euphoniumOne.ily
>
> $(piece)-euphoniumTwo.pdf: $(piece)-euphoniumTwo.ly euphoniumTwo.ily
>
> $(piece)-tuba.pdf: $(piece)-tuba.ly tuba.ily
>
> $(piece)-timpani.pdf: $(piece)-timpani.ly timpani.ily
>
> $(piece)-snaredrum.pdf: $(piece)-snaredrum.ly snaredrum.ily
>
> $(piece)-bassdrum.pdf: $(piece)-bassdrum.ly bassdrum.ily
>
> $(piece)-cymbals.pdf: $(piece)-cymbals.ly cymbals.ily
>
> $(piece)-tamtam.pdf: $(piece)-tamtam.ly tamtam.ily
>
>
> # Type `make score' to generate the full score of all four
>
> # movements as one file.
>
> .PHONY: score
>
> score: $(piece).pdf
>
>
> # Type `make parts' to generate all parts.
>
> # Type `make foo.pdf' to generate the part for instrument `foo'.
>
> # Example: `make symphony-cello.pdf'.
>
> .PHONY: parts
>
> parts: \
>
>        $(piece)-fluteOne.pdf \
>
>        $(piece)-fluteTwo.pdf \
>
>        $(piece)-oboeOne.pdf \
>
>        $(piece)-oboeTwo.pdf \
>
>        $(piece)-clarinetOne.pdf \
>
>        $(piece)-clarinetTwo.pdf \
>
>        $(piece)-clarinetThree.pdf \
>
>        $(piece)-bassclarinet.pdf \
>
>        $(piece)-bassoonOne.pdf \
>
>        $(piece)-bassoonTwo.pdf \
>
>        $(piece)-altosaxOne.pdf \
>
>        $(piece)-altosaxTwo.pdf \
>
>        $(piece)-tenorsax.pdf \
>
>        $(piece)-barisax.pdf \
>
>        $(piece)-hornOne.pdf \
>
>        $(piece)-hornTwo.pdf \
>
>        $(piece)-hornThree.pdf \
>
>        $(piece)-hornFour.pdf \
>
>        $(piece)-trumpetOne.pdf \
>
>        $(piece)-trumpetTwo.pdf \
>
>        $(piece)-trumpetThree.pdf \
>
>        $(piece)-tromboneOne.pdf \
>
>        $(piece)-tromboneTwo.pdf \
>
>        $(piece)-tromboneThree.pdf \
>
>        $(piece)-euphoniumOne.pdf \
>
>        $(piece)-euphoniumTwo.pdf \
>
>        $(piece)-tuba.pdf \
>
>        $(piece)-timpani.pdf \
>
>        $(piece)-snaredrum.pdf \
>
>        $(piece)-bassdrum.pdf \
>
>        $(piece)-cymbals.pdf \
>
>        $(piece)-tamtam.pdf
>
>
> # Type `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 \
>
>            $(piece)V.pdf
>
>
> all: score parts movements
>
>
> archive:
>
> tar -cvvf symphony2.tar \ # this line begins with a tab
>
> --exclude=*pdf --exclude=*~ \
>
> --exclude=*midi --exclude=*.tar \
>
> ../Symphony2/*
>
> _______________________________________________
>
>
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
{\rtf1\ansi\ansicpg1252\cocoartf1343\cocoasubrtf160
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace360\levelindent0{\*\levelmarker \{none\}.}{\leveltext\leveltemplateid1\'01.;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\deftab720
\pard\tx220\tx720\pardeftab720\li720\fi-720
\ls1\ilvl0
\f0\fs24 \cf0 \expnd0\expndtw0\kerning0
piece = symphony2\
CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//`\
\pard\pardeftab720
\cf0 \expnd0\expndtw0\kerning0
LILY_CMD = lilypond -ddelete-intermediate-files \\\
                      -dno-point-and-click #-djob-count=$(CPU_CORES)\
\
\
.SUFFIXES: .ly .ily .pdf .midi\
\
# Input and output files are searched in the directories listed in\
# the VPATH variable.  All of them are subdirectories of the current\
# directory (given by the GNU make variable `CURDIR').\
#CURDIR = $(shell pwd)\
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 put into the `PDF' subdirectory, and the\
# .midi files go 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 = \\\
	fluteOne.ily \\\
fluteTwo.ily \\\
oboeOne.ily \\\
oboeTwo.ily \\\
clarinetOne.ily \\\
clarinetTwo.ily \\\
clarinetThree.ily \\\
bassclarinet.ily \\\
bassoonOne.ily \\\
bassoonTwo.ily \\\
altosaxOne.ily \\\
altosaxTwo.ily \\\
tenorsax.ily \\\
barisax.ily \\\
hornOne.ily \\\
hornTwo.ily \\\
hornThree.ily \\\
hornFour.ily \\\
trumpetOne.ily \\\
trumpetTwo.ily \\\
trumpetThree.ily \\\
tromboneOne.ily \\\
tromboneTwo.ily \\\
tromboneThree.ily \\\
euphoniumOne.ily \\\
euphoniumTwo.ily \\\
tuba.ily \\\
timpani.ily \\\
snardrum.ily \\\
bassdrum.ily \\\
cymbals.ily \\\
tamtam.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)\
$(piece)V.pdf: $(piece)V.ly $(notes)\
\
# The dependencies of the full score.\
$(piece).pdf: $(piece).ly $(notes)\
\
# The dependencies of the parts.\
$(piece)-fluteOne.pdf: $(piece)-fluteOne.ly fluteOne.ily\
$(piece)-fluteTwo.pdf: $(piece)-fluteTwo.ly fluteTwo.ily\
$(piece)-oboeOne.pdf: $(piece)-oboeOne.ly oboeOne.ily\
$(piece)-oboeTwo.pdf: $(piece)-oboeTwo.ly oboeTwo.ily\
$(piece)-clarinetOne.pdf: $(piece)-clarinetOne.ly clarinetOne.ily\
$(piece)-clarinetTwo.pdf: $(piece)-clarinetTwo.ly clarinetTwo.ily\
$(piece)-clarinetThree.pdf: $(piece)-clarinetThree.ly clarinetThree.ily\
$(piece)-bassclarinet.pdf: $(piece)-bassclarinet.ly bassclarinet.ily\
$(piece)-bassoonOne.pdf: $(piece)-bassoonOne.ly bassoonOne.ily\
$(piece)-bassoonTwo.pdf: $(piece)-bassoonTwo.ly bassoonTwo.ily\
$(piece)-altosaxOne.pdf: $(piece)-altosaxOne.ly altosaxOne.ily\
$(piece)-altosaxTwo.pdf: $(piece)-altosaxTwo.ly altosaxTwo.ily\
$(piece)-tenorsax.pdf: $(piece)-tenorsax.ly tenorsax.ily\
$(piece)-barisax.pdf: $(piece)-barisax.ly barisax.ily\
$(piece)-hornOne.pdf: $(piece)-hornOne.ly hornOne.ily\
$(piece)-hornTwo.pdf: $(piece)-hornTwo.ly hornTwo.ily\
$(piece)-hornThree.pdf: $(piece)-hornThree.ly hornThree.ily\
$(piece)-hornFour.pdf: $(piece)-hornFour.ly hornFour.ily\
$(piece)-trumpetOne.pdf: $(piece)-trumpetOne.ly trumpetOne.ily\
$(piece)-trumpetTwo.pdf: $(piece)-trumpetTwo.ly trumpetTwo.ily\
$(piece)-trumpetThree.pdf: $(piece)-trumpetThree.ly trumpetThree.ily\
$(piece)-tromboneOne.pdf: $(piece)-tromboneOne.ly tromboneOne.ily\
$(piece)-tromboneTwo.pdf: $(piece)-tromboneTwo.ly tromboneTwo.ily\
$(piece)-tromboneThree.pdf: $(piece)-tromboneThree.ly tromboneThree.ily\
$(piece)-euphoniumOne.pdf: $(piece)-euphoniumOne.ly euphoniumOne.ily\
$(piece)-euphoniumTwo.pdf: $(piece)-euphoniumTwo.ly euphoniumTwo.ily\
$(piece)-tuba.pdf: $(piece)-tuba.ly tuba.ily\
$(piece)-timpani.pdf: $(piece)-timpani.ly timpani.ily\
$(piece)-snaredrum.pdf: $(piece)-snaredrum.ly snaredrum.ily\
$(piece)-bassdrum.pdf: $(piece)-bassdrum.ly bassdrum.ily\
$(piece)-cymbals.pdf: $(piece)-cymbals.ly cymbals.ily\
$(piece)-tamtam.pdf: $(piece)-tamtam.ly tamtam.ily\
\
# Type `make score' to generate the full score of all four\
# movements as one file.\
.PHONY: score\
score: $(piece).pdf\
\
# Type `make parts' to generate all parts.\
# Type `make foo.pdf' to generate the part for instrument `foo'.\
# Example: `make symphony-cello.pdf'.\
.PHONY: parts\
parts: \\\
       $(piece)-fluteOne.pdf \\\
       $(piece)-fluteTwo.pdf \\\
       $(piece)-oboeOne.pdf \\\
       $(piece)-oboeTwo.pdf \\\
       $(piece)-clarinetOne.pdf \\\
       $(piece)-clarinetTwo.pdf \\\
       $(piece)-clarinetThree.pdf \\\
       $(piece)-bassclarinet.pdf \\\
       $(piece)-bassoonOne.pdf \\\
       $(piece)-bassoonTwo.pdf \\\
       $(piece)-altosaxOne.pdf \\\
       $(piece)-altosaxTwo.pdf \\\
       $(piece)-tenorsax.pdf \\\
       $(piece)-barisax.pdf \\\
       $(piece)-hornOne.pdf \\\
       $(piece)-hornTwo.pdf \\\
       $(piece)-hornThree.pdf \\\
       $(piece)-hornFour.pdf \\\
       $(piece)-trumpetOne.pdf \\\
       $(piece)-trumpetTwo.pdf \\\
       $(piece)-trumpetThree.pdf \\\
       $(piece)-tromboneOne.pdf \\\
       $(piece)-tromboneTwo.pdf \\\
       $(piece)-tromboneThree.pdf \\\
       $(piece)-euphoniumOne.pdf \\\
       $(piece)-euphoniumTwo.pdf \\\
       $(piece)-tuba.pdf \\\
       $(piece)-timpani.pdf \\\
       $(piece)-snaredrum.pdf \\\
       $(piece)-bassdrum.pdf \\\
       $(piece)-cymbals.pdf \\\
       $(piece)-tamtam.pdf\
      \
# Type `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 \\\
           $(piece)V.pdf\
\
all: score parts movements\
\
archive:\
	tar -cvvf symphony2.tar \\	# this line begins with a tab\
	--exclude=*pdf --exclude=*~ \\\
	--exclude=*midi --exclude=*.tar \\\
	../Symphony2/*\
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to