diff --git a/Documentation/usage/suggestions.itely b/Documentation/usage/suggestions.itely index 73de64e0f9..a1f465b7fd 100644 --- a/Documentation/usage/suggestions.itely +++ b/Documentation/usage/suggestions.itely @@ -366,8 +366,8 @@ files in the @file{Notes} directory: @example %%% top of file "symphony-cello.ly" -\include ../symphonyDefs.ily -\include ../Notes/cello.ily +\include "../symphonyDefs.ily" +\include "../Notes/cello.ily" @end example The makefile will have targets of @code{score} (entire piece in @@ -384,8 +384,12 @@ subsequent lines must begin with tabs, not spaces.} @example # the name stem of the output files piece = symphony -# determine how many processors are present +# determine how many processors are present (GNU/Linux) CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//` +# +# variant for Mac OS / BSD: +# CPU_CORES=`sysctl -n hw.ncpu` +# # The command to run lilypond LILY_CMD = lilypond -ddelete-intermediate-files \ -dno-point-and-click -djob-count=$(CPU_CORES) @@ -393,6 +397,8 @@ LILY_CMD = lilypond -ddelete-intermediate-files \ # The suffixes used in this Makefile. .SUFFIXES: .ly .ily .pdf .midi +.DEFAULT_GOAL = score + # 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'). @@ -405,14 +411,18 @@ VPATH = \ # 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) $<; \ # this line begins with a tab - if test -f "$*.pdf"; then \ - mv "$*.pdf" PDF/; \ - fi; \ - if test -f "$*.midi"; then \ - mv "$*.midi" MIDI/; \ - fi +%.pdf %.midi &: %.ly | PDF MIDI + $(LILY_CMD) $< # this line begins with a tab + mv "$*.pdf" PDF/ + mv "$*.midi" MIDI/ + +PDF : + mkdir PDF + +MIDI : + mkdir MIDI + +common = symphonyDefs.ily notes = \ cello.ily \ @@ -423,21 +433,21 @@ notes = \ 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) +$(piece)I.pdf: $(piece)I.ly $(notes) $common +$(piece)II.pdf: $(piece)II.ly $(notes) $common +$(piece)III.pdf: $(piece)III.ly $(notes) $common +$(piece)IV.pdf: $(piece)IV.ly $(notes) $common # The dependencies of the full score. -$(piece).pdf: $(piece).ly $(notes) +$(piece).pdf: $(piece).ly $(notes) $common # The dependencies of the parts. -$(piece)-cello.pdf: $(piece)-cello.ly cello.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 +$(piece)-cello.pdf: $(piece)-cello.ly cello.ily $common +$(piece)-horn.pdf: $(piece)-horn.ly horn.ily $common +$(piece)-oboe.pdf: $(piece)-oboe.ly oboe.ily $common +$(piece)-viola.pdf: $(piece)-viola.ly viola.ily $common +$(piece)-violinOne.pdf: $(piece)-violinOne.ly violinOne.ily $common +$(piece)-violinTwo.pdf: $(piece)-violinTwo.ly violinTwo.ily $common # Type `make score' to generate the full score of all four # movements as one file. @@ -445,14 +455,14 @@ $(piece)-violinTwo.pdf: $(piece)-violinTwo.ly violinTwo.ily score: $(piece).pdf # Type `make parts' to generate all parts. -# Type `make foo.pdf' to generate the part for instrument `foo'. +# Type `make symphony-foo.pdf' to generate the part for instrument `foo'. # Example: `make symphony-cello.pdf'. .PHONY: parts parts: $(piece)-cello.pdf \ $(piece)-violinOne.pdf \ $(piece)-violinTwo.pdf \ $(piece)-viola.pdf \ - $(piece)-oboes.pdf \ + $(piece)-oboe.pdf \ $(piece)-horn.pdf # Type `make movements' to generate files for the