]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/SConscript
*** empty log message ***
[lilypond.git] / Documentation / SConscript
1 # -*-python-*-
2
3 import glob
4 import os
5
6 here = os.getcwd ()
7 reldir = str (Dir ('.').srcnode ())
8 os.chdir (reldir)
9 sources = glob.glob ('*.tely') + glob.glob ('user/*.tely')
10 os.chdir (here)
11
12 Import ('env')
13 e = env.Copy ()
14 outdir = os.path.join (env['build'], reldir, env['out'])
15
16 # Too late
17 e.Append (LILYPOND_BOOK_PATH = [os.path.join (env['srcdir'], reldir, 'user')])
18 e['LILYPOND_BOOK_PATH'].append (os.path.join (env['srcdir'], reldir, 'user'))
19
20
21
22 def verbose_opt (env, opt):
23         if env['verbose']:
24                 return opt
25         return ''
26
27 LILYPOND_BIN = env['LILYPOND_BIN']
28 LILYPONDPREFIX = env['LILYPONDPREFIX']
29
30
31 mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
32 e.Depends ('user/lilypond.texi', os.path.join (mfbuild, 'feta16list.ly'))
33 e.Depends ('user/lilypond.texi', os.path.join (mfbuild, 'parmesan16list.ly'))
34 e.Depends ('lilypond.texi', 'lilypond-internals.texi')
35
36 e.Command ('lilypond-internals.texi', LILYPOND_BIN,
37            ('(cd $$(dirname $TARGET) && \
38            LILYPONDPREFIX=%(LILYPONDPREFIX)s %(LILYPOND_BIN)s ' \
39             + verbose_opt (env, ' --verbose') \
40             + ' ' + os.path.join (env['srcdir'], 'ly/generate-documentation')\
41             + ')') % vars ())
42
43 docs = e.Tely2pdf (sources)
44
45 e.Alias ('doc', docs)
46
47 #testing
48 all_sources = ['SConscript',] + sources
49 x = env.Tar (env['tarball'], all_sources)