# -*-python-*-
-import glob
-import os
-
Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
sources = ['index.html.in', 'texinfo.css']
-os.chdir (here)
-outdir = os.path.join (env['build'], reldir, env['out'])
import sys
Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-sources = glob.glob ('*.tely')
-pngs = glob.glob ('*.png')
-os.chdir (here)
-outdir = os.path.join (env['build'], reldir, env['out'])
+sources = env['src_glob'] (env, '*.tely')
+pngs = env['src_glob'] (env, '*.png')
def verbose_opt (env, opt):
if env['verbose']:
lilybuild = os.path.join (env['absbuild'], 'lily', env['out'])
userbuild = os.path.join (env['absbuild'], 'Documentation/user', env['out'])
-# more of these? -- howto?
-env.Depends ('lilypond.texi', os.path.join (mfbuild, 'feta16list.ly'))
-env.Depends ('lilypond.texi', os.path.join (mfbuild, 'parmesan16list.ly'))
-# or these
-env.Depends ('doc', os.path.join (mfbuild, 'feta20.enc'))
-env.Depends ('doc', os.path.join (mfbuild, 'feta20.enc'))
-
env.Depends ('lilypond.texi', LILYPOND_BIN)
env.Depends ('lilypond.texi', 'lilypond-internals.texi')
-
-##env.Depends ('lilypond.texi', 'fonts')
-
-# simple:
env.Depends ('doc', mfbuild)
png_stems = map (lambda x: os.path.splitext (x)[0], pngs)
h.write (t)
h.close ()
-docdir = os.path.join (env['srcdir'], 'Documentation')
+##docdir = os.path.join (env['srcdir'], 'Documentation')
+docdir = Dir ('.').srcnode ().abspath + '/..'
+reldir = 'foe'
out = env['out']
srcdir = env['srcdir']
verbose = verbose_opt (env, ' --verbose')
# All builds everything (all directories)
env.Alias ('all', ['lily', 'mf', 'input', 'Documentation'])
+#?
+env.Depends ('Documentation', ['lily', 'mf'])
+env.Depends ('input', ['lily', 'mf'])
+env.Depends ('doc', ['lily', 'mf'])
+env.Depends ('doc', 'mf')
+env.Depends ('input', ['lily', 'mf'])
+
## FIXME: opts in function
defines['HAVE_PANGO_CVS'] = '1'
defines['HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC'] = '1'
- # ugh - needed at all? make Builder/Command for config.h!
+ # use Command
if not os.path.exists (outdir):
os.mkdir (outdir)
config.write ('#define %s %s\n' % (i, defines[i]))
config.close ()
-
os.system (sys.executable \
+ ' ./stepmake/bin/make-version.py VERSION > '\
+ os.path.join (outdir, 'version.hh'))
# Hmm. Must configure when building lily, to get compiler and linker
# flags set-up.
# FIXME
-if not os.path.exists (config_h) or 'config' in COMMAND_LINE_TARGETS\
- or 'lily' in BUILD_TARGETS or 'all' in BUILD_TARGETS:
+if 1 or not os.path.exists (config_h) or 'config' in COMMAND_LINE_TARGETS:
env = configure (env)
-if os.path.exists ('parser'):
- env.Append (LIBPATH = ['#/flower', '#/lily', '#/parser', '#/gui',],
- CPPPATH = [outdir, '#',])
-else:
- env.Append (LIBPATH = ['#/flower/' + out,],
- CPPPATH = [outdir, '#',])
+env.Append (LIBPATH = ['#/flower/' + out,], CPPPATH = [outdir, '#',])
Export ('env')
for d in subdirs:
b = os.path.join (build, d, out)
- # Support clean sourctree build (srcdir build)
- # and outdir build.
- # TODO: figure out SConscript (dir, builddir, duplicate)) feature
+ # Support clean sourcetree build (--srcdir build)
+ # and ./out build.
if (build and build != '.') \
or (out and out != '.'):
env.BuildDir (b, d, duplicate=0)
if env['debugging']:
prefix = os.path.join (out, 'usr')
- if not os.path.exists (prefix):
+ if not os.path.exists (os.path.join (absbuild, prefix)):
symlink_tree (prefix)
#### dist, tar
-src_files = ['ChangeLog', '.cvsignore', 'Documentation/index.html.in',
- 'lily/beam.cc']
-
def cvs_files (dir):
entries = open (os.path.join (dir, 'CVS/Entries')).readlines ()
files = filter (lambda x: x[0] != 'D', entries)
# -*-python-*-
+import glob
import os
import re
import string
base = os.path.splitext (str (target[0]))[0]
return (target, source + [base + '.enc'])
-def encoding_opt (target):
- base = os.path.splitext (os.path.basename (str (target[0])))[0]
- enc = base + '.enc'
- if os.path.exists (os.path.join (outdir, enc)):
- return ' --encoding=' + enc
- return ''
-
# UGH, should fix --output option for mftrace
verbose = verbose_opt (env, ' --verbose')
a = ('(cd ${TARGET.dir} && '
emitter = add_enc_src)
env.Append (BUILDERS = {'PFA': pfa})
-# FIXMExo
+# FIXME
#verbose = verbose_opt (env, ' --verbose')
verbose = ''
DIFF_PY = os.path.join (srcdir, 'stepmake/bin/package-diff.py')
patch = Builder (action = a, suffix = '.diff', src_suffix = '.tar.gz')
env.Append (BUILDERS = {'PATCH': patch})
+def src_glob (env, s):
+ here = os.getcwd ()
+ os.chdir (env.Dir ('.').srcnode ().abspath)
+ result = glob.glob (s)
+ os.chdir (here)
+ return result
+env['src_glob'] = src_glob
# -*-python-*-
-import glob
-import os
-
Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-sources = glob.glob ('*.cc')
-os.chdir (here)
-outdir = os.path.join (env['build'], reldir, env['out'])
+sources = env['src_glob'] (env, '*.cc')
+outdir = Dir ('.').path
+
+# abs_srcdir = Dir ('.').srcnode ().abspath
+# abs_outdir = Dir ('.').abspath
name = 'flower'
e = env.Copy ()
# -*-python-*-
-import glob
import os
Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-sources = glob.glob ('*.ly')
-abc_sources = glob.glob ('*.abc')
-os.chdir (here)
-outdir = os.path.join (env['build'], reldir, env['out'])
+sources = env['src_glob'] (env, '*.ly')
+abc_sources = env['src_glob'] (env, '*.abc')
+abc = map (lambda x: os.path.splitext (x)[0], abc_sources)
+lys = map (env.Abc2ly, abc)
-stems = map (lambda x: os.path.splitext (x)[0], sources)
-abc_stems = map (lambda x: os.path.splitext (x)[0], abc_sources)
-lys = map (env.Abc2ly, abc_stems)
-examples = map (env.LilyPond, stems + abc_stems)
+examples = map (env.LilyPond, sources + abc)
env.Alias ('doc', examples)
-
-LILYPOND_BIN = env['LILYPOND_BIN']
-
-mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
-#e.Depends ('doc', 'fonts')
-env.Depends ('doc', mfbuild)
-env.Depends ('doc', LILYPOND_BIN)
# -*-python-*-
-import glob
-import os
-
Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-sources = glob.glob ('*.cc') + ['parser.yy', 'lexer.ll']
-includes = glob.glob ('include/*.hh')
-os.chdir (here)
-outdir = os.path.join (env['build'], reldir, env['out'])
-
-name = 'lyparser'
+sources = env['src_glob'] (env, '*.cc') + ['parser.yy', 'lexer.ll']
+includes = env['src_glob'] (env, 'include/*.hh')
+outdir = Dir ('.').path
e = env.Copy ()
-
-#let's do this after the split
-#sources = filter (lambda x: x != 'pangofc-afm-decoder.cc', sources)
-#pango = env.Copy ()
-#if pango['gui']:
-# pango.ParseConfig ('pkg-config --cflags --libs gtk+-2.0')
-# pango.ParseConfig ('pkg-config --cflags --libs pango')
-#pango.Object ('foo-' + 'pangofc-afm-decoder.o', 'pangofc-afm-decoder.cc')
-#
-#e.Object ('pangofc-afm-decoder.o', 'foo-pangofc-afm-deocder.o')
-
e.Append (YACCFLAGS = '-d')
e.Append (CPPPATH = [outdir, '#/lily/include', '#/flower/include'])
e.Depends ('lexer.cc', 'parser.cc')
e.Depends ('my-lily-lexer.o', 'parser.cc')
e.Depends ('my-lily-parser.o', 'parser.cc')
-# some stuff here from lily-as-lib
e.Append (LIBS = ['flower'])
e.ParseConfig ('guile-config link')
name = 'lilypond-bin'
# -*-python-*-
-import glob
-import os
-
Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-sources = glob.glob ('*.ly')
-os.chdir (here)
-outdir = os.path.join (env['build'], reldir, env['out'])
-
-lydir = os.path.join (env['sharedir_package_version'], 'ly')
-env.Install (lydir, sources)
-env.Alias ('install', lydir)
+sources = env['src_glob'] (env, '*.scm')
+dir = env['sharedir_package_version'] + '/ly'
+env.Install (dir, sources)
+env.Alias ('install', dir)
# deal with "((latex ) >& 1 ) .." too
cmd = re.match ("([\(\)]*)([^ ]*)", cmd).group(2)
- return os.path.split (cmd)[1]
+ return os.basename (cmd)
def error_log (name):
name = re.sub('[^a-z]','x', name)
# -*-python-*-
-import glob
-import os
-
Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-sources = glob.glob ('*.scm')
-os.chdir (here)
-outdir = os.path.join (env['build'], reldir, env['out'])
-
-scmdir = os.path.join (env['sharedir_package_version'], 'scm')
-env.Install (scmdir, sources)
-env.Alias ('install', scmdir)
+sources = env['src_glob'] (env, '*.scm')
+dir = env['sharedir_package_version'] + '/scm'
+env.Install (dir, sources)
+env.Alias ('install', dir)