# -*-python-*-
-import glob
-import os
-
-## 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')
+includes = src_glob ('include/*.hh')
+outdir = Dir ('.').path
name = 'flower'
-Import ('env')
e = env.Copy ()
-e.Append (CPPPATH = ['include'])
+e.Append (CPPPATH = ['#/flower/include', outdir,])
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)