[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditional runs
From: |
Reinhold Kainhofer |
Subject: |
Re: Conditional runs |
Date: |
Thu, 11 Feb 2010 12:12:27 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31-19-generic; KDE/4.3.5; i686; ; ) |
Am Donnerstag, 11. Februar 2010 08:47:42 schrieb Karl Hammar:
> --------
> I try to do conditional lilypond runs. I can do that by having different
> files which includes the common parts, but I'd like to have just one
> source file and specify which version to use (in my case, mostly different
> page sizes). So I'm trying out the #(if (defined ..)) construct.
>
> 1, what is the rationale for "lilypond -d xx" to be restricted to just
> a certain list of variables?
If the given flag is not an officially supported one, then lilypond will print
out a warning, but the flag is still available, albeit not as a toplevel
function but via ly:get-option:
\version "2.13.0"
#(if (eqv? #t (ly:get-option 'flag))
(display "\n\tYes!\n")
(display "\n\tNo!\n")
)
gives you:
address@hidden:~$ lilypond -d flag test.ly
GNU LilyPond 2.13.12
Warnung: keine solche interne Option: flag
»/home/reinhold/test.ly« wird verarbeitet
Analysieren...
Yes!
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