[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditional runs
From: |
Karl Hammar |
Subject: |
Re: Conditional runs |
Date: |
Fri, 12 Feb 2010 12:27:51 +0100 (CET) |
Karl:
> 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.
...
> 2, what is "lilypond -e '...' meant to be used for?
Reading the manual [1]..., I read that I need use-mudules:
$ cat test.ly
#(use-modules (guile-user))
\version "2.13.0"
%#(if (eqv? #t (ly:get-option 'flag))
#(if (defined? 'flag)
(display "\n\tYes!\n")
(display "\n\tNo!\n")
)
$ lilypond -e '(define flag "a")' test.ly
GNU LilyPond 2.13.0
Processing `test.ly'
Parsing...WARNING: #f: imported module (guile-user) overrides core binding
`%module-public-interface'
Yes!
$
Is that warning simply stating an obvious fact, or is there a problem?
Regards,
/Karl
[1]
http://www.lilypond.org/doc/v2.13/Documentation/usage/command_002dline-usage#Command-line-options-for-lilypond
-----------------------------------------------------------------------
Karl Hammar Aspö Data address@hidden
Lilla Aspö 148 Networks
S-742 94 Östhammar +46 173 140 57 Computers
Sweden +46 70 511 97 84 Consulting
-----------------------------------------------------------------------