X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2FSConscript;h=c7e0abd4a0bf48686578c1cdcea4dd396dd1842a;hb=1a4dddb94cd1229914a6bdf30b7beed8a8e9a8cd;hp=08730ef0e33c1c347fc1c970e8346559a7a24c54;hpb=96505f9df73dbec6d19ceb78dbd8d3bb141137fe;p=lilypond.git diff --git a/flower/SConscript b/flower/SConscript index 08730ef0e3..c7e0abd4a0 100644 --- a/flower/SConscript +++ b/flower/SConscript @@ -1,25 +1,28 @@ # -*-python-*- -import glob -import os +name = 'flower' +outdir = Dir ('.').path -Import ('env') -here = os.getcwd () -reldir = str (Dir ('.').srcnode ()) -os.chdir (reldir) -sources = glob.glob ('*.cc') -includes = glob.glob ('include/*.hh') -os.chdir (here) -outdir = os.path.join (env['build'], reldir, env['out']) +Import ('env', 'src_glob') +sources = src_glob ('*.cc') -name = 'flower' e = env.Copy () -e.Append (CPPPATH = [outdir, '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) -#testing -all_sources = ['SConscript',] + sources + includes -x = env.Tar (env['tarball'], all_sources) +po = env.Command ('lilypond.po', sources + includes, env['pocommand']) +env.Alias ('po-update', po)