]> git.donarmstrong.com Git - lilypond.git/blob - lily/SConscript
*** empty log message ***
[lilypond.git] / lily / SConscript
1 # -*-python-*-
2
3 import glob
4 import os
5
6 Import ('env')
7 here = os.getcwd ()
8 reldir = str (Dir ('.').srcnode ())
9 os.chdir (reldir)
10 sources = glob.glob ('*.cc') + ['parser.yy', 'lexer.ll']
11 includes = glob.glob ('include/*.hh')
12 os.chdir (here)
13 outdir = os.path.join (env['build'], reldir, env['out'])
14
15 name = 'lyparser'
16
17 e = env.Copy ()
18
19 #let's do this after the split
20 #sources = filter (lambda x: x != 'pangofc-afm-decoder.cc', sources)
21 #pango = env.Copy ()
22 #if pango['gui']:
23 #       pango.ParseConfig ('pkg-config --cflags --libs gtk+-2.0')
24 #       pango.ParseConfig ('pkg-config --cflags --libs pango')
25 #pango.Object ('foo-' + 'pangofc-afm-decoder.o', 'pangofc-afm-decoder.cc')
26 #
27 #e.Object ('pangofc-afm-decoder.o', 'foo-pangofc-afm-deocder.o')
28
29 e.Append (YACCFLAGS = '-d')
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 env.Alias ('lily', lily)
44
45 all_sources = ['SConscript',] + sources + includes
46 # ballprefix = env['ballprefix'] + '/lily'
47 # ball = Builder (prefix = ballprefix + '/', action = 'ln $SOURCE $TARGET')
48 # et = env.Copy (BUILDERS = {'BALL': ball})
49 # ballize = map (et.BALL, all_sources)
50 # tar = env.Tar (env['tarball'],
51 #              map (lambda x: os.path.join (ballprefix, x), all_sources))