[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
conditional include
From: |
Urs Liska |
Subject: |
conditional include |
Date: |
Mon, 04 Feb 2013 16:48:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 |
Hi list,
I don't know if I _could_ find this info myself, but I'm quite puzzled
about it and so I'd rather ask:
I would like to \include files depending on the presence (or absence) of
certain command-line options.
Basically it should do something like:
- if option A is present then \include A.ily
- if option B is present then \include B.ily
- if none of them is present then \include default.ily
Ideally this would be a function that I can define in a separate file
and only include this file in my main .ly file.
Background is: A, B and default are style sheets that style the score
according to their context (e.g. standalone score <--> part of a book or
draft <--> final mode).
While I know how to deal with this decision by writing both includes in
the file and comment out the one I don't need ATM, I would highly prefer
to be able to do this with a command line option, so I can run a script
on a potentially large number of files. (The only other workaround I can
think of now is to let the script actually rewrite the .ly file before
compiling it, but I think that's not really elegant).
I'd be grateful about any hints or solutions.
Best
Urs
- conditional include,
Urs Liska <=