X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2FSConscript;h=c7e0abd4a0bf48686578c1cdcea4dd396dd1842a;hb=852977de8121f26b97abe7e63bd9b1a233274730;hp=c9443d3529cee5d2b0acd32fb0f303c8d6ecf06e;hpb=b35f1679bbc4132a399601f4258e28adbc71a64b;p=lilypond.git diff --git a/flower/SConscript b/flower/SConscript index c9443d3529..c7e0abd4a0 100644 --- a/flower/SConscript +++ b/flower/SConscript @@ -1,19 +1,28 @@ # -*-python-*- -import glob -import os +name = 'flower' +outdir = Dir ('.').path -## this only works for BuildDir aliasing, not for scons -Y ../scrdir -here = os.getcwd () -os.chdir (str (Dir ('.').srcnode ())) -sources = glob.glob ('*.cc') -os.chdir (here) +Import ('env', 'src_glob') +sources = src_glob ('*.cc') -name = 'flower' -Import ('env') e = env.Copy () -e.Append (CPPPATH = ['include']) +e.Append (CPPPATH = ['#/flower/include', outdir,]) +includes = src_glob ('include/*.hh') + +if 1: # ut + def test_source (x): + x.startswith ('test') + test_sources = filter (lambda x: x.startswith ('test'), sources) + sources = filter (lambda x: not x.startswith ('test'), sources) + ee = e.Copy () + ee.Append (LIBS = [name, 'boost_unit_test_framework']) + test = ee.Program ('test' + name, test_sources) + if env['static']: e.Library (name, sources) if not env['static'] or env['shared']: e.SharedLibrary (name, sources) + +po = env.Command ('lilypond.po', sources + includes, env['pocommand']) +env.Alias ('po-update', po)