lilypond-user
[Top][All Lists]
Advanced

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

Re: Is there an equivalent of #define ... #ifndef ... #endif in lilypond


From: David Kastrup
Subject: Re: Is there an equivalent of #define ... #ifndef ... #endif in lilypond?
Date: Fri, 24 Feb 2012 12:13:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Michael Hendry <address@hidden> writes:

> David Kastrup wrote:
>> 
>> David Kastrup <address@hidden> writes:
>> 
>> 
>> I picked the \paper settings of the book.
>> 
>> Updates:
>>      Labels: Patch-new
>> 
>> Comment #5 on issue 2343 by address@hidden: Faulty file-naming when
>> outputting multiple \books
>> http://code.google.com/p/lilypond/issues/detail?id=2343#c5
>> 
>> Issue 2343: Faulty file-naming when outputting multiple \books
>> 
>> http://codereview.appspot.com/5698050
>> 
>> 
>> It is conceivable that you don't need the C++ part of the patch just to
>> try it out in case you don't have the means to recompile.
>
> Thanks, David.
>
> This is all a bit close to the bleeding edge of the technology for me! 
>
> Is there a simple guide to the application of patches? - I'm looking
> for a step-by-step Delia Smith-style recipe as opposed to a more
> relaxed Jamie Oliver one, which might not be correct in every detail!

It depends.  By far the easiest way to apply a patch is when you have a
checkout of the source repository.  But that makes only sense when you
compile your own versions of LilyPond: if you apply patches and then
copy the patched files manually over a precompiled version of LilyPond
elsewhere, they might not play together well.

If you compile your own versions of LilyPond (which is not really all
that difficult), you _are_ at the bleeding edge.  If you are interested
in tracking development closely and trying out things as they are
developed and give feedback: by all means do.  It is interesting, and
you will get by far the fastest results when reporting bugs and waiting
for fixes to appear, and you can give feedback without waiting for the
next version.  But it certainly also costs time.

> Going back to my previous problem, I'd hoped I might be able to move:
>
> \book { \GuitarBook }
> \book { \ConcertBook }
> \book { \TrumpetBook }
> \book { \AltoBook }
>
> to the top of the file, so that I could comment out the unwanted \book
> statements, but lilypond doesn't seem to like forward references.

You can use

includeGuitar = ##t
includeConcert = ##f
includeTrumpet = ##t
includeAlto = ##f

at the top and then do

$(if includeGuitar GuitarBook)
$(if includeConcert ConcertBook)
$(if includeTrumpet TrumpetBook)
$(if includeAlto AltoBook)

at the bottom.

-- 
David Kastrup




reply via email to

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