]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/SConscript
Clean up buildscripts
[lilypond.git] / lily / SConscript
index 2a0bb0d07f60f3bc27049011cb38dec0b78088fb..ebd623fee9a203647ec2667a83a23505e39675a1 100644 (file)
@@ -1,32 +1,29 @@
 # -*-python-*-
 
-import glob
-import os
+Import ('env', 'src_glob', 'install')
 
-## this only works for BuildDir aliasing, not for scons -Y ../scrdir
-here = os.getcwd ()
-os.chdir (str (Dir ('.').srcnode ()))
-sources = glob.glob ('*.cc') + ['parser.yy', 'lexer.ll']
-os.chdir (here)
+outdir = Dir ('.').abspath
 
-name = 'lyparser'
+cc_sources =  src_glob ('*.cc')
+sources = cc_sources + ['parser.yy', 'lexer.ll']
+includes = src_glob ('include/*.hh')
 
-Import ('env')
 e = env.Copy ()
 
-e.Append (YACCFLAGS = '-d')
-e.Append (CPPPATH = ['include', '#/lily/include', '#/flower/include'])
-e.Depends ('lexer.cc', 'parser.cc')
+e.Append (
+       CPPPATH = [
+         '#/lily/include',
+         '#/flower/include',
+         outdir],
+       LEXFLAGS = ['-Cfe', '-p', '-p'],
+       LIBS = ['flower'],
+       )
 
-# some stuff here from lily-as-lib
-if not os.path.exists ('main.cc'):
-       if env['static']:
-               e.Library (name, sources) 
-       if not env['static'] or env['shared']:
-               e.SharedLibrary (name, sources)
-else:
-       #e.Append (LIBS = ['lygui', 'lyparser', 'lily', 'flower'])
-       e.Append (LIBS = ['flower'])
-       e.ParseConfig ('guile-config link')
-       name = 'lilypond-bin'
-       e.Program (name, sources)
+e.HH ('parser.hh', 'parser.yy')
+e.ParseConfig ('guile-config link')
+lily = e.Program ('lilypond', sources)
+install (lily, env['bindir'])
+
+# let's not, for now
+#po = env.Command ('lilypond.po', cc_sources + includes, env['pocommand'])
+#env.Alias ('po-update', po)