New feature: untainted text
[opus_libre.git] / lib / include.ly
blobde59b4ad2532b8e15a62dfa31bb32feb4caa3d44
1 %------------------------------------------------------------------%
2 % opus_libre -- include.ly %
3 % %
4 % (c) 2008-2011 Valentin Villenave <valentin@villenave.net> %
5 % %
6 % opus_libre is a free framework for GNU LilyPond: you may %
7 % redistribute it and/or modify it under the terms of the GNU %
8 % General Public License as published by the Free Software %
9 % Foundation, either version 3 of the License, or (at your option) %
10 % any later version. %
11 % This program is distributed WITHOUT ANY WARRANTY; without %
12 % even the implied warranty of MERCHANTABILITY or FITNESS FOR A %
13 % PARTICULAR PURPOSE. You should have received a copy of the GNU %
14 % General Public License along with this program (typically in the %
15 % share/doc/ directory). If not, see http://www.gnu.org/licenses/ %
16 % %
17 %------------------------------------------------------------------%
19 % Inclusion functions.
22 %% FIXME: relative includes don't work in Scheme -- Issue 1078.
23 #(ly:set-option 'relative-includes #f)
24 %#(ly:set-option 'ignore-output-dir #t)
25 %#(ly:set-option 'use-variable-names #t)
26 %#(ly:set-option 'allow-suffixless-varnames #t)
27 %#(ly:set-option 'no-auto-piano-dynamics#t)
28 %#(ly:set-option 'git-branch-as-score-name #t)
29 %#(ly:set-option 'untainted #t)
31 %%%%%%%%%%%%%%%%%%%%%%%%%% Base includes %%%%%%%%%%%%%%%%%%%%%%%%%%%
33 %% Base libraries -------------------------------------------------%
36 %%%%%%%%%%%%%%%%%%%%%%%%%% Load libraries %%%%%%%%%%%%%%%%%%%%%%%%%%
38 #(load "lib/init.scm")
39 #(include-scm conf:lib-dir #t)
40 %%%%%%%%%%%%%%%%%%%%%% Define music-functions %%%%%%%%%%%%%%%%%%%%%%
42 %% Required by main.ly --------------------------------------------%
43 % lang =
44 % #(define-music-function (parser location lang-code) (string?)
45 % (input-language lang-code)
46 % (make-sequential-music 'void #t))
48 % edition =
49 % #(define-music-function (parser location lang-code) (string?)
50 % (edition-language lang-code)
51 % (make-sequential-music 'void #t))
53 % make =
54 % #(define-music-function (parser location dir) (string?)
55 % (use-score-dir dir))
57 % #(define (exists? loc) (access? loc F_OK))
59 % #(define (load-lib dir file)
60 % (let* ((path (string-append dir "/" file ".scm")))
61 % (if (exists? path)
62 % (begin (load path)
63 % (if debug-messages (ly:message "Loading ~a..." path)))
64 % (if debug-messages (ly:message "File not found: ~a" path)))))
66 % #(let* ((files '(
67 % "score"
68 % "fstree"
69 % "readconf"
70 % "")))
71 % (map (lambda (x) (load-lib conf:lib-dir x))
72 % files))
75 %------------------------------------------------------------------%