[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to include a file just once?
From: |
Reinhold Kainhofer |
Subject: |
Re: How to include a file just once? |
Date: |
Thu, 21 Jan 2010 20:31:13 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31-17-generic; KDE/4.3.4; i686; ; ) |
Am Donnerstag, 21. Januar 2010 19:34:22 schrieb Tim McNamara:
> Without seeing your code, it's hard to tell what the problem is.
The problem is if you have a whole lot of include files, which all depend on
each other (and thus have to include some other files).
> When using \include to have a set of definitions, it is only
> necessary to do this once per .ly file.
Yes, but your included file might already include another file
> \version "2.12.2"
>
> #(ly:set-option 'delete-intermediate-files #t)
[...]
> \include "../../pop-chords.ly"
> \include "../../paren-2.ly"
And now imagine that both of the included files include some other file
blahblah.ily, which adds or removes some engraver to/from a context. The
engraver will be added twice, which is a very good way to produce lilypond
crashes...
I've also thought about preventing double includes with my orchestrallily
package, but so far I haven't really found a nice solution (but I'm also not
running into crashes, so it's not urgent for me).
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