Re: DOCS: revising LM "Score and Parts"

2009-05-28 Thread Trevor Daniels


Jonathan Kulp Wednesday, May 27, 2009 7:13 PM

Ok I think this makefile and the linux version are about ready for 
the docs.  Trevor, do you think it's logical to put this topic in 
the vicinity of "Score and Parts" or handling large projects?  For 
the moment I'll just write the texinfo source for this as a 
standalone section so that we can plug it in wherever it seems 
most appropriate.




"Scores and parts".  Then it comes after \include has
been introduced.  This section needs to be rewritten
entirely at some time though.  I'll make a start on
that when I have your input.

Trevor



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-27 Thread Henning Plumeyer

Am 27.05.2009, 07:25 Uhr, schrieb Henning Plumeyer :



 BTW: I got no difference with the "-djob-count" or without it.
   With the option: 2:45.218
   without: 2:45.000(!)
(On a 2.2GHz Athlon 64 X2 Dual Core Processor--is that a normal time?)
Seems as if the option should be omitted on Windows for simplicity.


The numbers 2:45.xxx are seconds of command duration (sorry, I didn't
write a unit after them).


Oh... unfortunately 2:45.218 means 2 minutes and 45.218 seconds. It would
be nice if my computer would be that fast!

Henning



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-27 Thread Jonathan Kulp

Henning Plumeyer wrote:

Am 27.05.2009, 04:41 Uhr, schrieb Jonathan Kulp :


Henning Plumeyer wrote:
Am 26.05.2009, 04:13 Uhr, schrieb Jonathan Kulp 
:


I had to comment out one more thing before it would run properly, 
though--the "-djob-count" option, something we put in on the Linux 
version to take advantage of dual processors.  It choked on that 
saying "unbound variable 'primitive-fork'".  This could be because 
I'm running on a virtual machine, though.  Did it work properly for 
you with the multiple jobs option?

 Hi Jon,
it worked properly for me. Maybe you got the long line cut like I saw
it on the gmane web interface. Below I put a version with three lines
for the lilypond command (as attachement also).


Hmm.  It still doesn't work for me with the job-count option.  It must 
be because I'm using virtual machines.


What do you get if you type  "set n" (Without the quotes)? It gives all
environment variables beginning with n or N. Is there
NUMBER_OF_PROCESSORS?



Yes, it says 1. My laptop has 2 processors, but I suppose the virtual 
machine can't take advantage of them.


Really, though, I think it's probably best to have two different 
Makefiles to avoid complication.  These are intended to give noobs 
direction in creating their own, and for me it's better to reduce the 
complications.



I agree, as it is an example it should be as simple as possible.


OK.




No, because I think midi is often used to check if everything is correct.
If you then hear a mistake you need the pdf to see what is written. For
this purpose, pdf and mid belong together.

This is a good point. I'll leave it as is but make a note in the 
comments that MIDI is only output on the "movements" target.


Ok I think this makefile and the linux version are about ready for the 
docs.  Trevor, do you think it's logical to put this topic in the 
vicinity of "Score and Parts" or handling large projects?  For the 
moment I'll just write the texinfo source for this as a standalone 
section so that we can plug it in wherever it seems most appropriate.


Jon

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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-26 Thread Henning Plumeyer

Am 27.05.2009, 04:41 Uhr, schrieb Jonathan Kulp :


Henning Plumeyer wrote:
Am 26.05.2009, 04:13 Uhr, schrieb Jonathan Kulp  
:


I had to comment out one more thing before it would run properly,  
though--the "-djob-count" option, something we put in on the Linux  
version to take advantage of dual processors.  It choked on that  
saying "unbound variable 'primitive-fork'".  This could be because I'm  
running on a virtual machine, though.  Did it work properly for you  
with the multiple jobs option?

 Hi Jon,
it worked properly for me. Maybe you got the long line cut like I saw
it on the gmane web interface. Below I put a version with three lines
for the lilypond command (as attachement also).


Hmm.  It still doesn't work for me with the job-count option.  It must  
be because I'm using virtual machines.


What do you get if you type  "set n" (Without the quotes)? It gives all
environment variables beginning with n or N. Is there
NUMBER_OF_PROCESSORS?


 BTW: I got no difference with the "-djob-count" or without it.
   With the option: 2:45.218
   without: 2:45.000(!)
(On a 2.2GHz Athlon 64 X2 Dual Core Processor--is that a normal time?)
Seems as if the option should be omitted on Windows for simplicity.


The numbers 2:45.xxx are seconds of command duration (sorry, I didn't
write a unit after them). As you see, the "-djob-count" option has no
use at least for me.


 I also got a way to work around the path-with-blank(s) problem.
Instead of CURDIR I fill and use a variable "workdir" in VPATH.
(Change the name if you like, I'm not a native speaker.) The used
technique for getting the 8.3 version of CURDIR is explained near
the end of the help for the command for ("for /h" on the Windows
commandline).


I like this.  It's probably essential for Windows versions earlier than  
Vista that have the spaces in the dirnames.  Thanks for figuring this  
out.  It works great.



Fine.


Instead of %%b %%a could be used, but as a German I don't like sa...
 I am looking for a way to distinguish from within the makefile
if make is running on Linux or Windows. Perhaps we could use the
environment variable "OS" which is OS=Windows_NT on my computer.
 make has "ifdef variable-name" and "ifeq (arg1, arg2)", so there
should be a chance. Then perhaps it could be possible to have the
same makefile for Linux (and OSX?) and Windows.
 Does Linux have a varialble OS? If not, we can check for
existence, if yes we check the value.



When I run "env" I don't get a value for OS.  In my shell scripts that I  
want to run on either Linux or Mac OSX, I check OS with this:


OS=$(uname)

Really, though, I think it's probably best to have two different  
Makefiles to avoid complication.  These are intended to give noobs  
direction in creating their own, and for me it's better to reduce the  
complications.



I agree, as it is an example it should be as simple as possible.


Regarding the mid/midi thing:
 We could use -dmidi-extension to set the default file extension
for MIDI output file to midi, but that touches the question of
the proper extension for midi.
(http://news.gmane.org/find-root.php?message_id=%3c20090408193658.GA2963%40zonnet.nl%3e)  
  Could we let lilypond give us the answer itself?

On Windows:
MidiExtWithQuotes = $(shell for /f "delims=() tokens=2" %%a in \
('lilypond -dhelp 2^>nul^|find "midi-extension"') \
do echo %%a)
 How can this be achived on Linux? You would have to build a
command that gives
midi
and nothing else.



This is a pretty cool feature you've written but I'm inclined just to  
live with .mid for the sake of simplicity.



Yes.

At one point I had a target to create only midi, but now I'm letting the  
midi files be created by the "movements" target.  None of the other  
targets create midi files.  It would be easy to have a midi-only target  
  with the -dno-print-pages option, I guess.  Do you think it would be  
better to separate midi into its own target?



No, because I think midi is often used to check if everything is correct.
If you then hear a mistake you need the pdf to see what is written. For
this purpose, pdf and mid belong together.

I think you will modify the file as you want. Ask me if you want me to
do that.

Henning



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-26 Thread Jonathan Kulp

Henning Plumeyer wrote:

Am 26.05.2009, 04:13 Uhr, schrieb Jonathan Kulp :

I had to comment out one more thing before it would run properly, 
though--the "-djob-count" option, something we put in on the Linux 
version to take advantage of dual processors.  It choked on that 
saying "unbound variable 'primitive-fork'".  This could be because I'm 
running on a virtual machine, though.  Did it work properly for you 
with the multiple jobs option?


Hi Jon,
it worked properly for me. Maybe you got the long line cut like I saw
it on the gmane web interface. Below I put a version with three lines
for the lilypond command (as attachement also).


Hmm.  It still doesn't work for me with the job-count option.  It must 
be because I'm using virtual machines.  I installed a virtual XP machine 
today for testing.  It has the annoying "Documents and Settings" with 
spaces in the dirname.  Windows 7 at least doesn't have this problem.





BTW: I got no difference with the "-djob-count" or without it.
   With the option: 2:45.218
   without: 2:45.000(!)
(On a 2.2GHz Athlon 64 X2 Dual Core Processor--is that a normal time?)
Seems as if the option should be omitted on Windows for simplicity.

I also got a way to work around the path-with-blank(s) problem.
Instead of CURDIR I fill and use a variable "workdir" in VPATH.
(Change the name if you like, I'm not a native speaker.) The used
technique for getting the 8.3 version of CURDIR is explained near
the end of the help for the command for ("for /h" on the Windows
commandline).



I like this.  It's probably essential for Windows versions earlier than 
Vista that have the spaces in the dirnames.  Thanks for figuring this 
out.  It works great.



Instead of %%b %%a could be used, but as a German I don't like sa...

I am looking for a way to distinguish from within the makefile
if make is running on Linux or Windows. Perhaps we could use the
environment variable "OS" which is OS=Windows_NT on my computer.

make has "ifdef variable-name" and "ifeq (arg1, arg2)", so there
should be a chance. Then perhaps it could be possible to have the
same makefile for Linux (and OSX?) and Windows.

Does Linux have a varialble OS? If not, we can check for
existence, if yes we check the value.



When I run "env" I don't get a value for OS.  In my shell scripts that I 
want to run on either Linux or Mac OSX, I check OS with this:


OS=$(uname)

Really, though, I think it's probably best to have two different 
Makefiles to avoid complication.  These are intended to give noobs 
direction in creating their own, and for me it's better to reduce the 
complications.



Regarding the mid/midi thing:

We could use -dmidi-extension to set the default file extension
for MIDI output file to midi, but that touches the question of
the proper extension for midi.
(http://news.gmane.org/find-root.php?message_id=%3c20090408193658.GA2963%40zonnet.nl%3e) 



Could we let lilypond give us the answer itself?
On Windows:
MidiExtWithQuotes = $(shell for /f "delims=() tokens=2" %%a in \
('lilypond -dhelp 2^>nul^|find "midi-extension"') \
do echo %%a)

How can this be achived on Linux? You would have to build a
command that gives
midi
and nothing else.



This is a pretty cool feature you've written but I'm inclined just to 
live with .mid for the sake of simplicity.


At one point I had a target to create only midi, but now I'm letting the 
midi files be created by the "movements" target.  None of the other 
targets create midi files.  It would be easy to have a midi-only target 
 with the -dno-print-pages option, I guess.  Do you think it would be 
better to separate midi into its own target?


Jon





# the name stem of the output files
piece = stamitz
# The command to run lilypond
LILY_CMD = lilypond -ddelete-intermediate-files \
-dno-point-and-click \
-djob-count=$(NUMBER_OF_PROCESSORS)

#get the 8.3 name of CURDIR
workdir = $(shell for /f "tokens=*" %%b in ("$(CURDIR)") \
  do @echo %%~sb)

# let lilypond tell us the default midi extension
MidiExtWithQuotes = $(shell for /f "delims=() tokens=2" %%a in \
('lilypond -dhelp 2^>nul^|find "midi-extension"') \
do echo %%a)

#remove all doublequotes
MidiExt = $(subst ",,$(MidiExtWithQuotes))

# The suffixes used in this Makefile.
.SUFFIXES: .ly .ily .pdf .$(MidiExt)

# 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 workdir variable which is the 8.3 version
# of the GNU make variable `CURDIR').
VPATH = \
  $(workdir)/Scores \
  $(workdir)/PDF \
  $(workdir)/Parts \
  $(workdir)/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 %.$(MidiExt): %.ly
$(LILY_CMD) $<
if exist "$*.pdf"  move /Y "$*.pdf"  

Re: DOCS: revising LM "Score and Parts"

2009-05-26 Thread Henning Plumeyer

Am 26.05.2009, 04:13 Uhr, schrieb Jonathan Kulp :

I had to comment out one more thing before it would run properly,  
though--the "-djob-count" option, something we put in on the Linux  
version to take advantage of dual processors.  It choked on that saying  
"unbound variable 'primitive-fork'".  This could be because I'm running  
on a virtual machine, though.  Did it work properly for you with the  
multiple jobs option?


Hi Jon,
it worked properly for me. Maybe you got the long line cut like I saw
it on the gmane web interface. Below I put a version with three lines
for the lilypond command (as attachement also).

BTW: I got no difference with the "-djob-count" or without it.
   With the option: 2:45.218
   without: 2:45.000(!)
(On a 2.2GHz Athlon 64 X2 Dual Core Processor--is that a normal time?)
Seems as if the option should be omitted on Windows for simplicity.

I also got a way to work around the path-with-blank(s) problem.
Instead of CURDIR I fill and use a variable "workdir" in VPATH.
(Change the name if you like, I'm not a native speaker.) The used
technique for getting the 8.3 version of CURDIR is explained near
the end of the help for the command for ("for /h" on the Windows
commandline).

Instead of %%b %%a could be used, but as a German I don't like sa...

I am looking for a way to distinguish from within the makefile
if make is running on Linux or Windows. Perhaps we could use the
environment variable "OS" which is OS=Windows_NT on my computer.

make has "ifdef variable-name" and "ifeq (arg1, arg2)", so there
should be a chance. Then perhaps it could be possible to have the
same makefile for Linux (and OSX?) and Windows.

Does Linux have a varialble OS? If not, we can check for
existence, if yes we check the value.

Regarding the mid/midi thing:

We could use -dmidi-extension to set the default file extension
for MIDI output file to midi, but that touches the question of
the proper extension for midi.
(http://news.gmane.org/find-root.php?message_id=%3c20090408193658.GA2963%40zonnet.nl%3e)

Could we let lilypond give us the answer itself?
On Windows:
MidiExtWithQuotes = $(shell for /f "delims=() tokens=2" %%a in \
('lilypond -dhelp 2^>nul^|find "midi-extension"') \
do echo %%a)

How can this be achived on Linux? You would have to build a
command that gives
midi
and nothing else.

Henning




# the name stem of the output files
piece = stamitz
# The command to run lilypond
LILY_CMD = lilypond -ddelete-intermediate-files \
-dno-point-and-click \
-djob-count=$(NUMBER_OF_PROCESSORS)

#get the 8.3 name of CURDIR
workdir = $(shell for /f "tokens=*" %%b in ("$(CURDIR)") \
  do @echo %%~sb)

# let lilypond tell us the default midi extension
MidiExtWithQuotes = $(shell for /f "delims=() tokens=2" %%a in \
('lilypond -dhelp 2^>nul^|find "midi-extension"') \
do echo %%a)

#remove all doublequotes
MidiExt = $(subst ",,$(MidiExtWithQuotes))

# The suffixes used in this Makefile.
.SUFFIXES: .ly .ily .pdf .$(MidiExt)

# 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 workdir variable which is the 8.3 version
# of the GNU make variable `CURDIR').
VPATH = \
  $(workdir)/Scores \
  $(workdir)/PDF \
  $(workdir)/Parts \
  $(workdir)/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 %.$(MidiExt): %.ly
$(LILY_CMD) $<
if exist "$*.pdf"  move /Y "$*.pdf"  PDF/
if exist "$*.$(MidiExt)" move /Y "$*.$(MidiExt)" MIDI/

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)-v

Re: DOCS: revising LM "Score and Parts"

2009-05-26 Thread Werner LEMBERG
>> Uuh, you are using `%.midi' in the rule but you are moving *.mid
>> files!  You should use `%.mid' too since this is what lilypond
>> creates if run on Windows, right?  The comment should be updated
>> accordingly.
>
> You're right, but oddly, it worked as expected even without fixing
> the pattern rule.  The .mid files were put into the MIDI directory.

Well, if you don't mention the MIDI file somewhere else in the
Makefile, the `%.midi: %.ly' rule never gets executed -- it is the
`%.pdf: %.ly' part which creates both PDF and MIDI output (and which
subsequently gets renamed afterwards).

For testing purposes, you might try to add

  foo: $(piece)I.mid

to the make file, retaining the incorrect rule.  Now saying

  make foo

won't work at all.


Werner


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-26 Thread Jonathan Kulp

Werner LEMBERG wrote:

If there is at least one blank (on a german Windows the home
directory is called "c:\Dokumente und Einstellungen\")
searching does not work.


I suggest that you contact the help-m...@gnu.org mailing list,
providing a minimal (trivial) example demonstrating the VPATH problem.
Either this is a bug in the Windows port of GNU make, or they know a
solution.



This is a known issue.  I found this (old but apparently still relevant) 
posting about it:


Pathnames and white space:

Unlike Unix, Windows 95/NT systems encourage pathnames which
contain white space (e.g. C:\Program Files\). These sorts of pathnames
are legal under Unix too, but are never encouraged. There is
at least one place in make (VPATH/vpath handling) where paths
containing white space will simply not work. There may be others
too. I chose to not try and port make in such a way so that
these sorts of paths could be handled. I offer these suggestions
as workarounds:

1. Use 8.3 notation
2. Rename the directory so it does not contain white space.

If you are unhappy with this choice, this is free software
and you are free to take a crack at making this work. The code
in w32/pathstuff.c and vpath.c would be the places to start."

In the meantime I'll be sure there's a warning about this issue in the 
docs.  I had the directory on the desktop, and there are no spaces in 
that path so it worked. When I tried to rename the "Documents and 
Settings" directory on XP, I got a warning saying it was a system folder 
and it was dangerous to rename.  Windows 7 must have a different 
directory structure--now the "My Documents" directory is a subdirectory 
of my user directory. It allowed me to change "My Documents" to 
"Documents" without warning.




# 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 exist "$*.pdf" move /Y "$*.pdf" PDF/
if exist "$*.mid" move /Y "$*.mid" MIDI/


Uuh, you are using `%.midi' in the rule but you are moving *.mid
files!  You should use `%.mid' too since this is what lilypond creates
if run on Windows, right?  The comment should be updated accordingly.



You're right, but oddly, it worked as expected even without fixing the 
pattern rule. The .mid files were put into the MIDI directory.  I had 
forgotten the different suffixes until I saw them in there. I'll fix it 
in the Windows Makefile though.


Thanks Werner,

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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-25 Thread Werner LEMBERG

>> If there is at least one blank (on a german Windows the home
>> directory is called "c:\Dokumente und Einstellungen\")
>> searching does not work.

I suggest that you contact the help-m...@gnu.org mailing list,
providing a minimal (trivial) example demonstrating the VPATH problem.
Either this is a bug in the Windows port of GNU make, or they know a
solution.

>> # 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 exist "$*.pdf" move /Y "$*.pdf" PDF/
>> if exist "$*.mid" move /Y "$*.mid" MIDI/

Uuh, you are using `%.midi' in the rule but you are moving *.mid
files!  You should use `%.mid' too since this is what lilypond creates
if run on Windows, right?  The comment should be updated accordingly.


Werner


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-25 Thread Jonathan Kulp
Wow!  Thanks so much, Henning!  This is great.  We'll put it in the docs 
alongside the one for Linux/MacOSX.  I had to comment out one more thing 
before it would run properly, though--the "-djob-count" option, 
something we put in on the Linux version to take advantage of dual 
processors.  It choked on that saying "unbound variable 
'primitive-fork'".  This could be because I'm running on a virtual 
machine, though.  Did it work properly for you with the multiple jobs 
option?


Again, thank you very much for working on this.

Jon

Henning Plumeyer wrote:

Am 25.05.2009, 20:19 Uhr, schrieb Jonathan Kulp :


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/


Jon,
here is a changed version of your makefile, which works under Windows XP.
Changes:
- I use the environment variable "NUMBER_OF_PROCESSORS".
- .mid instead of .midi
- the pattern rule to create PDF and MID(I) files
- tar part commented out, cause on Windows you don't have tar

It works only if no blanks are in the path to the working directory.

If there is at least one blank (on a german Windows the home directory
is called "c:\Dokumente und Einstellungen\") searching does
not work. With  make -r -R -p I see the last ends of the parts of
VPATH.
I have tried double quotes around the VPATH parts, it didn't help.
Neither did using semi-colons.

Henning



# the name stem of the output files
piece = stamitz
# The command to run lilypond
LILY_CMD = lilypond -ddelete-intermediate-files \
-dno-point-and-click 
-djob-count=$(NUMBER_OF_PROCESSORS)


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

# 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 exist "$*.pdf"  move /Y "$*.pdf"  PDF/
if exist "$*.mid" move /Y "$*.mid" MIDI/

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/*



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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-25 Thread Henning Plumeyer

Am 25.05.2009, 20:19 Uhr, schrieb Jonathan Kulp :


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/


Jon,
here is a changed version of your makefile, which works under Windows XP.
Changes:
- I use the environment variable "NUMBER_OF_PROCESSORS".
- .mid instead of .midi
- the pattern rule to create PDF and MID(I) files
- tar part commented out, cause on Windows you don't have tar

It works only if no blanks are in the path to the working directory.

If there is at least one blank (on a german Windows the home directory
is called "c:\Dokumente und Einstellungen\") searching does
not work. With  make -r -R -p I see the last ends of the parts of
VPATH.
I have tried double quotes around the VPATH parts, it didn't help.
Neither did using semi-colons.

Henning



# the name stem of the output files
piece = stamitz
# The command to run lilypond
LILY_CMD = lilypond -ddelete-intermediate-files \
-dno-point-and-click  
-djob-count=$(NUMBER_OF_PROCESSORS)


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

# 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 exist "$*.pdf"  move /Y "$*.pdf"  PDF/
if exist "$*.mid" move /Y "$*.mid" MIDI/

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/*



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-25 Thread Jonathan Kulp

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/*


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-24 Thread Werner LEMBERG

>> 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.

>>%.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 


Werner


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-24 Thread Werner LEMBERG

>> I don't know what
>>  $(LILY_CMD) $<; \
>> means,

This calls lilypond -- or rather the contents of the variable LILY_CMD
-- with the prerequisite (the *.ly file) as the argument.

>> but the two if statements seem to check if there are any pdf or
>> midi files around and then move them to their directories.
>>
>> On Windows this can be achieved as follows:
>>  if exist *.pdf  move "*.pdf" PDF/
>>  if exist *.midi move "*.pdf" MIDI/
> 
> If it has to be on one line:
>   if exist *.pdf  move "*.pdf" PDF/ & if exist *.midi move "*.pdf" MIDI/

It is not necessary to put everything on a single line, but if you do
so you avoid (at least under GNU/Linux) additional calls to the
command shell, making the execution faster.


 Werner


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-24 Thread Henning Plumeyer

Am 25.05.2009, 00:21 Uhr, schrieb Henning Plumeyer :



I don't know what
$(LILY_CMD) $<; \
means, but the two if statements seem to check if there are any pdf or
midi files around and then move them to their directories.

On Windows this can be achieved as follows:
if exist *.pdf  move "*.pdf" PDF/
if exist *.midi move "*.pdf" MIDI/


If it has to be on one line:
if exist *.pdf  move "*.pdf" PDF/ & if exist *.midi move "*.pdf" MIDI/

Henning



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-24 Thread Henning Plumeyer

Am 23.05.2009, 04:41 Uhr, schrieb Jonathan Kulp :

I've made some progress.  When I try to run "make score" on Windows XP,  
I get the following message:


   make: *** No rule to make target `stamitz.ly', needed by  
`stamitz.pdf'. Stop.


I get no such message when I run it on Linux.  Right now the target  
"score" is defined like this:


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

   .PHONY: score
   score: $(piece).pdf

At the top of the makefile is the pattern rule:

   # 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

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.


Maybe I can help a bit, allthough I don't know make, but I am familiar with
windows and it's command line.
I've just read a little bit of the helpfile of make. As far as I understand
in the block below the line
%.pdf %.midi: %.ly
are commands to execute. So they have to be translated to the Windows
batch language.

I don't know what
$(LILY_CMD) $<; \
means, but the two if statements seem to check if there are any pdf or
midi files around and then move them to their directories.

On Windows this can be achieved as follows:
if exist *.pdf  move "*.pdf" PDF/
if exist *.midi move "*.pdf" MIDI/

BTW, Windows can handle paths with / as well as with \.

Henning



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-24 Thread Jonathan Kulp

Valentin Villenave wrote:

2009/5/22 Jonathan Kulp :

Initial efforts are fruitless.  I installed GNUMake on the XP partition, but
when I type the command "make" in the dos shell, it says there's no such
program.  I tried "Make" and "make.exe" as well with the same results.  I
have no idea what to try next because there's hardly anything about running
it on Windows in the documentation.  I'll check more on it later.  I find it
exhausting even to spend a few minutes using Windows...


Have you installed Mingw/MSys? This is the preferred way to have not
only make but all essential commands available; this way you can use
proper bash instead of cmd.
http://www.mingw.org/wiki/msys


Regards,
Valentin



I haven't tried that.  Maybe I'll try it tonight.  Thanks for the 
recommendation.


Jon

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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-24 Thread Valentin Villenave
2009/5/22 Jonathan Kulp :
> Initial efforts are fruitless.  I installed GNUMake on the XP partition, but
> when I type the command "make" in the dos shell, it says there's no such
> program.  I tried "Make" and "make.exe" as well with the same results.  I
> have no idea what to try next because there's hardly anything about running
> it on Windows in the documentation.  I'll check more on it later.  I find it
> exhausting even to spend a few minutes using Windows...

Have you installed Mingw/MSys? This is the preferred way to have not
only make but all essential commands available; this way you can use
proper bash instead of cmd.
http://www.mingw.org/wiki/msys


Regards,
Valentin


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-23 Thread Jonathan Kulp
Are you just talking about the if .. then conditional part?  First I'll try
just commenting that whole thing out and see if it will compile, then I'll
try to figure out how to deliver the output to the right directories.
Thanks Ian,

Jon.

On Sat, May 23, 2009 at 8:19 AM, Ian Hulin  wrote:

> Jon,
> You've put Linux-style bash shell commands to interpret this rule to
> differentiate what to do for the midi and pf files
> if ...
>
> don't forget that on Windows you're dealing with the cmd command-line
> interpreter rather than bash, so you may need to do a Windows-variant
> version of this rule.
>
> On Windows, pull up a terminal window (click Flag/Run and type in cmd into
> the dialogue box), and then enter help at the command line.  You'll see all
> the Windows command-line stuff there.
>
> Cheers,
>
> Ian
>
>
>
> Jonathan Kulp wrote:
>
>> Carl D. Sorensen wrote:
>>
>>>
>>>  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.

 I'm encouraged that it's pretty easy to run lily files at the DOS
 command line on Windows, at least.

>>>
>>> Are you getting caught by the path separator:  it's \ in windows, but /
>>> in
>>> linux?
>>>
>>>
>> I don't think so.  You'll notice that the score target that compiles
>> correctly uses unix-style separator / instead of Windows \.  This works, I
>> assume, because it is inside the Makefile, and GNU Make for Windows
>> translates it.  It looks to me as if the Windows GNU Make has trouble with
>> the pattern rule with the % signs: %.pdf %.midi: %.ly
>>
>> Maybe someone who actually uses Windows can understand this better.
>> Clearly this makefile isn't as portable as we'd hoped it would be.  As
>> another approach I may go ahead and install cygwin on it, but I'm already
>> growing weary of trying stuff that doesn't work.  I'm about ready to put the
>> Makefile section in the docs with a big warning saying it doesn't work on
>> Windows without a lot of tweaking.
>>
>> Jon
>>
>>
>
>
> ___
> lilypond-devel mailing list
> lilypond-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-devel
>



-- 
Jonathan Kulp
http://www.jonathankulp.com
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-23 Thread Ian Hulin

Jon,
You've put Linux-style bash shell commands to interpret this rule to 
differentiate what to do for the midi and pf files

if ...

don't forget that on Windows you're dealing with the cmd command-line 
interpreter rather than bash, so you may need to do a Windows-variant 
version of this rule.


On Windows, pull up a terminal window (click Flag/Run and type in cmd 
into the dialogue box), and then enter help at the command line.  You'll 
see all the Windows command-line stuff there.


Cheers,

Ian


Jonathan Kulp wrote:

Carl D. Sorensen wrote:



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.

I'm encouraged that it's pretty easy to run lily files at the DOS
command line on Windows, at least.


Are you getting caught by the path separator:  it's \ in windows, but 
/ in

linux?



I don't think so.  You'll notice that the score target that compiles 
correctly uses unix-style separator / instead of Windows \.  This works, 
I assume, because it is inside the Makefile, and GNU Make for Windows 
translates it.  It looks to me as if the Windows GNU Make has trouble 
with the pattern rule with the % signs: %.pdf %.midi: %.ly


Maybe someone who actually uses Windows can understand this better. 
Clearly this makefile isn't as portable as we'd hoped it would be.  As 
another approach I may go ahead and install cygwin on it, but I'm 
already growing weary of trying stuff that doesn't work.  I'm about 
ready to put the Makefile section in the docs with a big warning saying 
it doesn't work on Windows without a lot of tweaking.


Jon





___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Carl D. Sorensen wrote:



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.

I'm encouraged that it's pretty easy to run lily files at the DOS
command line on Windows, at least.


Are you getting caught by the path separator:  it's \ in windows, but / in
linux?



I don't think so.  You'll notice that the score target that compiles 
correctly uses unix-style separator / instead of Windows \.  This works, 
I assume, because it is inside the Makefile, and GNU Make for Windows 
translates it.  It looks to me as if the Windows GNU Make has trouble 
with the pattern rule with the % signs: %.pdf %.midi: %.ly


Maybe someone who actually uses Windows can understand this better. 
Clearly this makefile isn't as portable as we'd hoped it would be.  As 
another approach I may go ahead and install cygwin on it, but I'm 
already growing weary of trying stuff that doesn't work.  I'm about 
ready to put the Makefile section in the docs with a big warning saying 
it doesn't work on Windows without a lot of tweaking.


Jon

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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Carl D. Sorensen wrote:



I would agree with that.

Sometimes stuff is in My Documents, which has a space.

Carl



I've made some progress.  When I try to run "make score" on Windows XP, 
I get the following message:


  make: *** No rule to make target `stamitz.ly', needed by 
`stamitz.pdf'. Stop.


I get no such message when I run it on Linux.  Right now the target 
"score" is defined like this:


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

  .PHONY: score
  score: $(piece).pdf

At the top of the makefile is the pattern rule:

  # 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

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.


I'm encouraged that it's pretty easy to run lily files at the DOS 
command line on Windows, at least.


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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Carl D. Sorensen



On 5/22/09 8:41 PM, "Jonathan Kulp"  wrote:

> Carl D. Sorensen wrote:
> 
>> 
>> I would agree with that.
>> 
>> Sometimes stuff is in My Documents, which has a space.
>> 
>> Carl
>> 
> 
> I've made some progress.  When I try to run "make score" on Windows XP,
> I get the following message:
> 
>make: *** No rule to make target `stamitz.ly', needed by
> `stamitz.pdf'. Stop.
> 
> I get no such message when I run it on Linux.  Right now the target
> "score" is defined like this:
> 
># The dependencies of the full score.
>$(piece).pdf: $(piece).ly $(notes)
> 
>.PHONY: score
>score: $(piece).pdf
> 
> At the top of the makefile is the pattern rule:
> 
># 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
> 
> 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.
> 
> I'm encouraged that it's pretty easy to run lily files at the DOS
> command line on Windows, at least.

Are you getting caught by the path separator:  it's \ in windows, but / in
linux?

Just a thought,

Carl

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



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Carl D. Sorensen



On 5/22/09 5:33 PM, "Jonathan Kulp"  wrote:

> Carl D. Sorensen wrote:
>> 
>> On 5/22/09 3:48 PM, "Jonathan Kulp"  wrote:
>> 
>>> Carl D. Sorensen wrote:
 You may want to make sure you have the right make:
 
 which make
 
 make --version
 
>>> GNU Make 3.81
>>> 
>>> That's the same version number I have on Linux.
>>> 
>>> Jon
>>> 
>> 
>> Do you have spaces in your document path?  Sometimes that confuses things.
>> 
>> Carl
>> 
> 
> None of my own files or directories have spaces.  Windows puts spaces in
> some of system directories by default, though. Do I need to worry about
> those, like the "Program Files" directory?  The DOS shell is finding the
> make.exe file now that I set the PATH correctly, so it seems unlikely
> that the space in the Program Files dir is causing any problems.

I would agree with that.

Sometimes stuff is in My Documents, which has a space.

Carl




___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Carl D. Sorensen wrote:


On 5/22/09 3:48 PM, "Jonathan Kulp"  wrote:


Carl D. Sorensen wrote:

You may want to make sure you have the right make:

which make

make --version


GNU Make 3.81

That's the same version number I have on Linux.

Jon



Do you have spaces in your document path?  Sometimes that confuses things.

Carl



None of my own files or directories have spaces.  Windows puts spaces in 
some of system directories by default, though. Do I need to worry about 
those, like the "Program Files" directory?  The DOS shell is finding the 
make.exe file now that I set the PATH correctly, so it seems unlikely 
that the space in the Program Files dir is causing any problems.


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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Carl D. Sorensen


On 5/22/09 3:48 PM, "Jonathan Kulp"  wrote:

> Carl D. Sorensen wrote:
>> 
>> You may want to make sure you have the right make:
>> 
>> which make
>> 
>> make --version
>> 
> 
> GNU Make 3.81
> 
> That's the same version number I have on Linux.
> 
> Jon
> 

Do you have spaces in your document path?  Sometimes that confuses things.

Carl




___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Carl D. Sorensen wrote:


You may want to make sure you have the right make:

which make

make --version



GNU Make 3.81

That's the same version number I have on Linux.

Jon

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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Carl D. Sorensen



On 5/22/09 3:18 PM, "Jonathan Kulp"  wrote:

> Mats Bengtsson wrote:
>> Jonathan Kulp wrote:
>>> Carl D. Sorensen wrote:
> This is a good idea, Carl.  I wouldn't mind trying it myself. My son's
> laptop has XP on one partition but I don't know if I'll be able to get
> on there and try this out.  I'd be a good one to try it, though,
> because
> I'm totally clueless on Windows, and if I can get it working then
> anybody could. :)
 
 I think you'd be perfect, Jon, because
 a) You are interested
 b) You know the makefile
 c) You don't know Windows
 
 Carl
 
 
>>> 
>>> Initial efforts are fruitless.  I installed GNUMake on the XP
>>> partition, but when I type the command "make" in the dos shell, it
>>> says there's no such program.  I tried "Make" and "make.exe" as well
>>> with the same results.  I have no idea what to try next because
>>> there's hardly anything about running it on Windows in the
>>> documentation.  I'll check more on it later.  I find it exhausting
>>> even to spend a few minutes using Windows...
>>> 
>> It sounds as if you have to include it in PATH environment variable
>> (Right click on "My Computer", choose the Advanced tab and click on
>> Environment variables). I'm sure you know more than most Windows users
>> about how to set PATH, just remember to use semicolon instead of comma
>> to separate the paths.
>> 
>>   /Mats
>>> Jon
>> 
>> 
> I suspected a PATH issue and found this solution on a website somewhere
> and did it.  Now I can run the "make" command, but it's telling me
> there's no rule for the target I selected.  I know very well that
> there's a rule since it works perfectly on Linux, so I'm going to try
> simplifying it to see if I can make it run.

You may want to make sure you have the right make:

which make

make --version


Carl



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Mats Bengtsson wrote:

Jonathan Kulp wrote:

Carl D. Sorensen wrote:

This is a good idea, Carl.  I wouldn't mind trying it myself. My son's
laptop has XP on one partition but I don't know if I'll be able to get
on there and try this out.  I'd be a good one to try it, though, 
because

I'm totally clueless on Windows, and if I can get it working then
anybody could. :)


I think you'd be perfect, Jon, because
a) You are interested
b) You know the makefile
c) You don't know Windows

Carl




Initial efforts are fruitless.  I installed GNUMake on the XP 
partition, but when I type the command "make" in the dos shell, it 
says there's no such program.  I tried "Make" and "make.exe" as well 
with the same results.  I have no idea what to try next because 
there's hardly anything about running it on Windows in the 
documentation.  I'll check more on it later.  I find it exhausting 
even to spend a few minutes using Windows...


It sounds as if you have to include it in PATH environment variable 
(Right click on "My Computer", choose the Advanced tab and click on 
Environment variables). I'm sure you know more than most Windows users 
about how to set PATH, just remember to use semicolon instead of comma 
to separate the paths.


  /Mats

Jon



I suspected a PATH issue and found this solution on a website somewhere 
and did it.  Now I can run the "make" command, but it's telling me 
there's no rule for the target I selected.  I know very well that 
there's a rule since it works perfectly on Linux, so I'm going to try 
simplifying it to see if I can make it run.


Thanks Mats,

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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Mats Bengtsson

Jonathan Kulp wrote:

Carl D. Sorensen wrote:

This is a good idea, Carl.  I wouldn't mind trying it myself. My son's
laptop has XP on one partition but I don't know if I'll be able to get
on there and try this out.  I'd be a good one to try it, though, 
because

I'm totally clueless on Windows, and if I can get it working then
anybody could. :)


I think you'd be perfect, Jon, because
a) You are interested
b) You know the makefile
c) You don't know Windows

Carl




Initial efforts are fruitless.  I installed GNUMake on the XP 
partition, but when I type the command "make" in the dos shell, it 
says there's no such program.  I tried "Make" and "make.exe" as well 
with the same results.  I have no idea what to try next because 
there's hardly anything about running it on Windows in the 
documentation.  I'll check more on it later.  I find it exhausting 
even to spend a few minutes using Windows...


It sounds as if you have to include it in PATH environment variable 
(Right click on "My Computer", choose the Advanced tab and click on 
Environment variables). I'm sure you know more than most Windows users 
about how to set PATH, just remember to use semicolon instead of comma 
to separate the paths.


  /Mats

Jon



--
=
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: mats.bengts...@ee.kth.se
WWW: http://www.s3.kth.se/~mabe
=



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Carl D. Sorensen wrote:

This is a good idea, Carl.  I wouldn't mind trying it myself. My son's
laptop has XP on one partition but I don't know if I'll be able to get
on there and try this out.  I'd be a good one to try it, though, because
I'm totally clueless on Windows, and if I can get it working then
anybody could. :)


I think you'd be perfect, Jon, because
a) You are interested
b) You know the makefile
c) You don't know Windows

Carl




Initial efforts are fruitless.  I installed GNUMake on the XP partition, 
but when I type the command "make" in the dos shell, it says there's no 
such program.  I tried "Make" and "make.exe" as well with the same 
results.  I have no idea what to try next because there's hardly 
anything about running it on Windows in the documentation.  I'll check 
more on it later.  I find it exhausting even to spend a few minutes 
using Windows...


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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Carl D. Sorensen wrote:


But aren't the commands run from the Makefile dependent on something
like Cygwin?  I honestly don't know, I'm just wondering.


Windows has a built in command shell, and at least from my cursory overview
GNU Make knows how to work with it.

I think that all of the lilypond specific stuff is already installed with
lilypond.

The biggest potential problem I see is that Windows uses "delete" where
linux uses "rm".  But this is easily handled in the makefile, I think.



I'll try to run the targets that don't have rm first, just to see if 
it'll compile anything.  I think I could handle adding a conditional 
statement to do "delete" instead of "rm" depending on what the OS is.



If you'd like, I can ask on user for a guinea pig.

Carl


This is a good idea, Carl.  I wouldn't mind trying it myself. My son's
laptop has XP on one partition but I don't know if I'll be able to get
on there and try this out.  I'd be a good one to try it, though, because
I'm totally clueless on Windows, and if I can get it working then
anybody could. :)


I think you'd be perfect, Jon, because
a) You are interested
b) You know the makefile
c) You don't know Windows



I'm sold!  I'll try to do this tonight after the kids are asleep. 
Fiddle time is at a minimum now that summer has started and the kids are 
out of school.


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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Carl D. Sorensen



On 5/22/09 7:36 AM, "Jonathan Kulp"  wrote:

> Carl D. Sorensen wrote:
>> 
>> 
>> On 5/21/09 4:16 PM, "John Mandereau"  wrote:
>> 
>>> Graham Percival a écrit :
 Also, I'm slightly leery about how the Makefile stuff would be
 introduced -- it should be obvious that this only works on linux
 and osx (by default), and would require a lot of additional
 software to run on window.
 
>>> A default Cygwin installation provides all you need for this IIRC < this
>>> is a lot anyway, but this is doable with a few clicks :-)
>> 
>> Can't the Windows user just download GNU Make for Windows?
>> 
>> 
>> 
>> I see no need to get a full Cygwin package just for make.
>> 
> 
> But aren't the commands run from the Makefile dependent on something
> like Cygwin?  I honestly don't know, I'm just wondering.

Windows has a built in command shell, and at least from my cursory overview
GNU Make knows how to work with it.

I think that all of the lilypond specific stuff is already installed with
lilypond.

The biggest potential problem I see is that Windows uses "delete" where
linux uses "rm".  But this is easily handled in the makefile, I think.

> 
>> If you'd like, I can ask on user for a guinea pig.
>> 
>> Carl
>> 
> 
> This is a good idea, Carl.  I wouldn't mind trying it myself. My son's
> laptop has XP on one partition but I don't know if I'll be able to get
> on there and try this out.  I'd be a good one to try it, though, because
> I'm totally clueless on Windows, and if I can get it working then
> anybody could. :)

I think you'd be perfect, Jon, because
a) You are interested
b) You know the makefile
c) You don't know Windows

Carl



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Jonathan Kulp

Carl D. Sorensen wrote:



On 5/21/09 4:16 PM, "John Mandereau"  wrote:


Graham Percival a écrit :

Also, I'm slightly leery about how the Makefile stuff would be
introduced -- it should be obvious that this only works on linux
and osx (by default), and would require a lot of additional
software to run on window.
 

A default Cygwin installation provides all you need for this IIRC < this
is a lot anyway, but this is doable with a few clicks :-)


Can't the Windows user just download GNU Make for Windows?



I see no need to get a full Cygwin package just for make.



But aren't the commands run from the Makefile dependent on something 
like Cygwin?  I honestly don't know, I'm just wondering.



If you'd like, I can ask on user for a guinea pig.

Carl



This is a good idea, Carl.  I wouldn't mind trying it myself. My son's 
laptop has XP on one partition but I don't know if I'll be able to get 
on there and try this out.  I'd be a good one to try it, though, because 
I'm totally clueless on Windows, and if I can get it working then 
anybody could. :)


Jon

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


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Carl D. Sorensen



On 5/21/09 4:16 PM, "John Mandereau"  wrote:

> Graham Percival a écrit :
>> Also, I'm slightly leery about how the Makefile stuff would be
>> introduced -- it should be obvious that this only works on linux
>> and osx (by default), and would require a lot of additional
>> software to run on window.
>>  
> A default Cygwin installation provides all you need for this IIRC < this
> is a lot anyway, but this is doable with a few clicks :-)

Can't the Windows user just download GNU Make for Windows?



I see no need to get a full Cygwin package just for make.

If you'd like, I can ask on user for a guinea pig.

Carl




___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-22 Thread Graham Percival
On Fri, May 22, 2009 at 12:16:41AM +0200, John Mandereau wrote:
> Graham Percival a écrit :
>> Also, I'm slightly leery about how the Makefile stuff would be
>> introduced -- it should be obvious that this only works on linux
>> and osx (by default), and would require a lot of additional
>> software to run on window.
>>   
> A default Cygwin installation provides all you need for this IIRC — this  
> is a lot anyway, but this is doable with a few clicks :-)

Sure!  Let's explain how to install+use cygwin, in 3 sentences or
less, for somebody who's never heard the word "unix" or "linux"
before.  :P

Cheers,
- Graham


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-21 Thread John Mandereau

Graham Percival a écrit :

Also, I'm slightly leery about how the Makefile stuff would be
introduced -- it should be obvious that this only works on linux
and osx (by default), and would require a lot of additional
software to run on window.
  
A default Cygwin installation provides all you need for this IIRC — this 
is a lot anyway, but this is doable with a few clicks :-)


Cheers,
John


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: DOCS: revising LM "Score and Parts"

2009-05-21 Thread Graham Percival
On Wed, May 20, 2009 at 10:00:01PM -0500, Jonathan Kulp wrote:
> I see that there's a TODO in the "working.itely" file that says the  
> "Score and Parts" section needs rewriting or scrapping.  Any objection  
> if I take a stab at rewriting this and working in a section on  
> Makefiles?

No objection, although I can't recall if we discuss the process of
generating both score and parts anywhere else.  If not, you'll
need to go over the basics before proceeding.

Also, I'm slightly leery about how the Makefile stuff would be
introduced -- it should be obvious that this only works on linux
and osx (by default), and would require a lot of additional
software to run on window.

Cheers,
- Graham


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel