lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 1821 in lilypond: GUB argument list too long


From: Reinhold Kainhofer
Subject: Re: Issue 1821 in lilypond: GUB argument list too long
Date: Tue, 16 Aug 2011 14:09:03 +0200
User-agent: KMail/1.13.6 (Linux/2.6.38-10-generic; KDE/4.7.0; i686; ; )

Am Tuesday, 16. August 2011, 13:56:26 schrieben Sie:
> On Aug 16, 2011, at 1:51 PM, Reinhold Kainhofer wrote:
> > Am Tuesday, 16. August 2011, 13:06:11 schrieben Sie:
> >> On Aug 16, 2011, at 12:58 PM, Reinhold Kainhofer wrote:
> >>> Am Tuesday, 16. August 2011, 12:47:13 schrieb Mike Solomon:
> >>>> On Aug 16, 2011, at 12:06 PM, David Kastrup wrote:
> >>>>> If we can't pass the filenames to a call of lys-to-tely because of
> >>>>> command line length limits, I don't see us passing the filenames to
> >>>>> "echo" or similar shell commands more easily in order to write them
> >>>>> to a file.
> >>>> 
> >>>> The filenames can be written to a file via a python script, something
> > 
> > like:
> >>> ... and how do you get the list to the python script?
> >> 
> >> With the script I wrote before, just put something in
> >> scripts/build called long-file-list-to-file.py and then in
> >> lysdoc-rules.make :
> >> 
> >> $(outdir)/collated-files.tely: $(FOO)
> >> 
> >>        $(LONG_FILE_LIST_TO_FILE) "."
> > 
> > What I meant was: How long will this $(LONG_FILE_LIST_TO_FILE) command
> > be???
> > 
> > This command will be just as long as our original lys-to-tely call, and
> > will thus not work. We simply cannot call any command that needs the
> > list of files on the command line.
> 
> In the previous script I sent (I've pasted it below), you'll see that
> long-file-list-to-file.py takes one argument (the directory name) and uses
> os.listdir to do the directory listing in python, thus avoiding the long
> list.

The problem is that we don't simply want all *.ly files in the directory to be 
used. For example, 
-) in the input/regression/musicxml, we want all *.xml *.mxl *.texi files,
-) while in input/regression/ we want all *.ly *.texi, 
-) and in input/regression/abc we want all files generated from *.abc 
   files (i.e. the .ly files don't exist yet!) 
-) and in input/regression/midi/ we want all *-midi.ly files, which 
   are generated from the *.ly (so we don't want the existing .ly 
   files here, either).


> It looks like your most recent proposition does the same thing in
> shell-script-speak (a language that I don't understand, so someone else
> will have to chime in with comments about how its written), which is a
> better idea, as it avoids another python script.

It's actually looping over all entries in $(COLLATED_FILES) using a function 
of the make system. In particular, the command

 $(foreach f,$(COLLATED_FILES),@echo $f >> $(outdir)/collated-files.txt)

can be written in Pseudo-code as:

for f in $(COLLATED_FILES):
  # append $f to the file, using a simple shell command:
  echo $f >> $(outdir)/collated-files.txt 

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org



reply via email to

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