X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2FSConscript;h=c7e0abd4a0bf48686578c1cdcea4dd396dd1842a;hb=543171165412bc915d8ea1f308d070c74924b2f1;hp=8b7d6e9866c6bfebaaa6b7066704e27b0a41d909;hpb=36a2ef8fd1db451ea9318743561856b4f0907ba2;p=lilypond.git diff --git a/flower/SConscript b/flower/SConscript index 8b7d6e9866..c7e0abd4a0 100644 --- a/flower/SConscript +++ b/flower/SConscript @@ -1,22 +1,28 @@ # -*-python-*- -Import ('env') -sources = env['src_glob'] (env, '*.cc') -includes = env['src_glob'] (env, '*.hh') +name = 'flower' outdir = Dir ('.').path -# abs_srcdir = Dir ('.').srcnode ().abspath -# abs_outdir = Dir ('.').abspath +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) -#pot = env.POT (sources + includes) -#map (lambda x: e.Depends -pot = env.Command (env['pottarget'], sources + includes, env['potcommand']) -env.Alias ('pot', pot) +po = env.Command ('lilypond.po', sources + includes, env['pocommand']) +env.Alias ('po-update', po)