]> git.donarmstrong.com Git - lilypond.git/blob - lily/SConscript
* lily/main.cc (dir_info): Print variables in sh format.
[lilypond.git] / lily / 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 ('*.cc') + ['parser.yy', 'lexer.ll']
10 includes = glob.glob ('include/*.hh')
11 os.chdir (here)
12
13 name = 'lyparser'
14
15 Import ('env')
16 e = env.Copy ()
17
18 #let's do this after the split
19 #sources = filter (lambda x: x != 'pangofc-afm-decoder.cc', sources)
20 #pango = env.Copy ()
21 #if pango['gui']:
22 #       pango.ParseConfig ('pkg-config --cflags --libs gtk+-2.0')
23 #       pango.ParseConfig ('pkg-config --cflags --libs pango')
24 #pango.Object ('foo-' + 'pangofc-afm-decoder.o', 'pangofc-afm-decoder.cc')
25 #
26 #e.Object ('pangofc-afm-decoder.o', 'foo-pangofc-afm-deocder.o')
27
28 e.Append (YACCFLAGS = '-d')
29 outdir = os.path.join (env['build'], reldir, env['out'])
30 e.Append (CPPPATH = [outdir, '#/lily/include', '#/flower/include'])
31 e.Depends ('lexer.cc', 'parser.cc')
32 e.Depends ('my-lily-lexer.o', 'parser.cc')
33 e.Depends ('my-lily-parser.o', 'parser.cc')
34
35 # some stuff here from lily-as-lib
36 e.Append (LIBS = ['flower'])
37 e.ParseConfig ('guile-config link')
38 name = 'lilypond-bin'
39 lily = e.Program (name, sources)
40 env.Install (env['bindir'], lily)
41 env.Alias ('install', env['bindir'])
42
43
44 #testing
45 all_sources = ['SConscript',] + sources + includes 
46 x = env.Tar (env['tarball'], all_sources)