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: Sat, 25 Feb 2012 10:22:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Michael Hendry <address@hidden> writes:

> Francisco Vila wrote:
>> 
>> 2012/2/25 Michael Hendry <address@hidden>:
>>> I've compiled
>> 
>> compiled?
>> 
>>> and installed lilypond-2.15.9 (the latest version I could
>>> find)
>> 
>> 2.15.30 is in http://lilypond.org/development , where did you search
>> for it? Forget google for a moment and go to the official home page of
>> the project. Remember: it's lilypond.org
>
> Thanks, David, Harm & Francisco. I'm grateful for your tolerance of my
> blunders!
>
> Yes, I had downloaded the source for lilypond-2.15.9 and compiled and
> installed it. 
>
> Running lilypond-2.15.30-1.linux-x86.sh would have been much quicker and
> easier, but we (usually) learn from our mistakes!
>
> Francisco's simple file now works as expected, with the "D" missing when
> "whether" is ##f, but unfortunately it would seem that the $(if...) method
> can't handle a variable which is a book.
>
> GNU LilyPond 2.15.30
> Processing `score.ly'
> Parsing...
> score.ly:39:0: error: syntax error, unexpected BOOK_IDENTIFIER
>
> $(if includeGuitar GuitarBook )
> fatal error: failed files: "score.ly"

Oh, the $(if ) method can perfectly handle variables which are a book.
It is just LilyPond that does not accept a book identifier at top
level.  So you have to write something like
\book { $(if includeGuitar GuitarBook) }
and rely on an empty book not having an effect.

Yes, this is a bit awkward.  If you are fine with downloading,
compiling, and installing _source_ to a degree that you do it without
asking twice just because of some outdated information, tracking the
development version (including testing out patches as they come) will
not likely be a big step for you.

And anyway: it is likely that you have now LilyPond 2.15.9 plastered all
over /usr/local already, and you might as well plaster the current
development version over it instead of trying to remove all that so that
it does not shadow "standard" precompiled versions.

-- 
David Kastrup




reply via email to

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