From b35f1679bbc4132a399601f4258e28adbc71a64b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 7 Jul 2004 00:33:02 +0000 Subject: [PATCH] Update. --- ChangeLog | 4 ++++ SConstruct | 50 +++++++++++++++++++++-------------------------- flower/SConscript | 11 +++++++---- lily/SConscript | 9 +++++++-- 4 files changed, 40 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42291b8189..980594aee7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-07-07 Jan Nieuwenhuizen + + * SConstruct: Update. + 2004-07-07 Han-Wen Nienhuys * input/regression/beam-quant-standard.ly (seconds): print desired diff --git a/SConstruct b/SConstruct index babe6eb4ae..66c4f448c2 100644 --- a/SConstruct +++ b/SConstruct @@ -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') diff --git a/flower/SConscript b/flower/SConscript index 54ad4dc8ca..c9443d3529 100644 --- a/flower/SConscript +++ b/flower/SConscript @@ -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) diff --git a/lily/SConscript b/lily/SConscript index 5fd637b024..2a0bb0d07f 100644 --- a/lily/SConscript +++ b/lily/SConscript @@ -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']) -- 2.39.5