]> git.donarmstrong.com Git - lilypond.git/commitdiff
Update.
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 7 Jul 2004 00:33:02 +0000 (00:33 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 7 Jul 2004 00:33:02 +0000 (00:33 +0000)
ChangeLog
SConstruct
flower/SConscript
lily/SConscript

index 42291b81896a070b418e6b42f21d0354d154500b..980594aee77fd7d964dacc021ca6ffe2ca1b8793 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-07-07  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * SConstruct: Update.
+
 2004-07-07  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * input/regression/beam-quant-standard.ly (seconds): print desired
index babe6eb4ae2d4dec61261deea67bfac908ab4507..66c4f448c26529a0750a1118c71acddf693a4f42 100644 (file)
@@ -18,9 +18,8 @@ import string
 env = Environment ()
 
 opts = Options (None, ARGUMENTS)
-##opts.Add (PackageOption ('prefix', 'Install prefix', '/usr/'))
-## `Path' means a directory rather than a path?
-opts.Add (PathOption ('prefix', 'Install prefix', '/usr/'))
+opts.Add ('prefix', 'Install prefix', '/usr/')
+opts.Add ('outdir', 'Output directory', 'out')
 opts.AddOptions (
        BoolOption ('warnings', 'compile with -Wall and similiar',
                   1),
@@ -29,9 +28,9 @@ opts.AddOptions (
        BoolOption ('optimising', 'compile with optimising',
                    1),
        BoolOption ('shared', 'build shared libraries',
-                   1),
-       BoolOption ('static', 'build static libraries',
                    0),
+       BoolOption ('static', 'build static libraries',
+                   1),
        )
 
 Help (opts.GenerateHelpText (env))
@@ -96,38 +95,33 @@ for i in defines.keys ():
 config.close ()
 env = conf.Finish ()
 
+os.system (sys.executable \
+          + ' ./stepmake/bin/make-version.py VERSION > version.hh')
+
+Export ('env')
+
+#this could happen after flower...
+env.ParseConfig ('guile-config compile')
+
+builddir = ''
+outdir = env['outdir']
+
 if os.path.exists ('parser'):
        env.Append (LIBPATH = ['#/flower', '#/lily', '#/parser', '#/gui',],
                    CPPPATH = ['#',])
 else:  
-       env.Append (LIBPATH = ['#/flower', '#/lily',],
+       env.Append (LIBPATH = ['#/flower/' + outdir,],
                    CPPPATH = ['#',])
 
-os.system (sys.executable \
-          + ' ./stepmake/bin/make-version.py VERSION > version.hh')
-
-Export ('env')
-
 
-if 1:
-       #simple: build in ./flower
-       SConscript ('flower/SConscript')
-else:
-       # moellik: build in [/tmp/build/]flower[/out]
-       # werkt 'bijna', maar glob in flower/Sconscript snapt niet
-       # dat-i in flower SCRDRI moet globben
-       builddir = ''
-       outdir = 'out'
+#ugh: remove make config output
+if os.path.exists ('lily/out/config.h'):
+       os.unlink ('lily/out/config.h')
 
-       d = 'flower'
+subdirs = ('flower', 'lily',)
+#subdirs = ('flower', 'lily', 'parser', 'gui', 'main',)
+for d in subdirs:
        alias = os.path.join (builddir, d, outdir)
        env.BuildDir (alias, d)
        SConscript (os.path.join (alias, 'SConscript'))
 
-env.ParseConfig ('guile-config compile')
-
-SConscript ('lily/SConscript')
-if os.path.exists ('parser'):
-       SConscript ('parser/SConscript')
-       SConscript ('gui/SConscript')
-       SConscript ('main/SConscript')
index 54ad4dc8cadb239f7886a6a6bc965da9363e09dc..c9443d3529cee5d2b0acd32fb0f303c8d6ecf06e 100644 (file)
@@ -1,16 +1,19 @@
 # -*-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)
 
 name = 'flower'
-
 Import ('env')
-##print `env.__dict__`
-
 e = env.Copy ()
 e.Append (CPPPATH = ['include'])
 if env['static']:
        e.Library (name, sources) 
-if not env['static'] or ['shared']:
+if not env['static'] or env['shared']:
        e.SharedLibrary (name, sources)
index 5fd637b02492d3955da99254622d7bf26ba8965e..2a0bb0d07f60f3bc27049011cb38dec0b78088fb 100644 (file)
@@ -3,7 +3,12 @@
 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') + ['parser.yy', 'lexer.ll']
+os.chdir (here)
+
 name = 'lyparser'
 
 Import ('env')
@@ -14,10 +19,10 @@ e.Append (CPPPATH = ['include', '#/lily/include', '#/flower/include'])
 e.Depends ('lexer.cc', 'parser.cc')
 
 # some stuff here from lily-as-lib
-if os.path.exists ('main.cc'):
+if not os.path.exists ('main.cc'):
        if env['static']:
                e.Library (name, sources) 
-       if not env['static'] or ['shared']:
+       if not env['static'] or env['shared']:
                e.SharedLibrary (name, sources)
 else:
        #e.Append (LIBS = ['lygui', 'lyparser', 'lily', 'flower'])