From 1943ccda1ed4ec111ef7e830302f1cfea240e27e Mon Sep 17 00:00:00 2001 From: janneke Date: Thu, 15 Jul 2004 14:33:15 +0000 Subject: [PATCH] * lily/slur.cc: Add quant-score to interface. Fixes web build. * python/SConscript: * python/vim: * input/mutopia/*SConscript: New file. * scm/define-grobs.scm (all-grob-descriptions): Use ,Slur::height, fixes web build. * make/stepmake.make (scons): re-route to SCONS if user has been running scons in this tree. * SConstruct (config_vars): Add CPPDEFINES. (env): Set checksums type to "content". (save_config_cache): Do not exit after configuring when using checksums (the default) instead of timestamps. --- ChangeLog | 23 ++- Documentation/user/SConscript | 23 ++- SConstruct | 179 ++++++++++++------ buildscripts/builder.py | 41 +++- elisp/SConscript | 13 +- input/SConscript | 5 +- input/mutopia/E.Satie/SConscript | 4 + input/mutopia/F.Schubert/SConscript | 4 + input/mutopia/J.S.Bach/SConscript | 4 + input/mutopia/R.Schumann/SConscript | 4 + input/mutopia/SConscript | 4 + input/mutopia/W.A.Mozart/SConscript | 4 + input/mutopia/W.A.Mozart/mozart-hrn-3.ly | 8 +- ...rn3-allegro.ly => mozart-hrn3-allegro.ily} | 2 +- ...zart-hrn3-defs.ly => mozart-hrn3-defs.ily} | 0 ...rn3-romanze.ly => mozart-hrn3-romanze.ily} | 2 +- ...rt-hrn3-rondo.ly => mozart-hrn3-rondo.ily} | 2 +- input/regression/SConscript | 19 +- input/template/SConscript | 19 +- input/test/SConscript | 19 +- input/test/new-slur.ly | 9 + lily/SConscript | 1 + lily/slur.cc | 2 +- make/stepmake.make | 34 ++++ mf/SConscript | 22 +-- scm/define-grobs.scm | 5 +- vim/SConscript | 16 ++ 27 files changed, 311 insertions(+), 157 deletions(-) create mode 100644 input/mutopia/E.Satie/SConscript create mode 100644 input/mutopia/F.Schubert/SConscript create mode 100644 input/mutopia/J.S.Bach/SConscript create mode 100644 input/mutopia/R.Schumann/SConscript create mode 100644 input/mutopia/SConscript create mode 100644 input/mutopia/W.A.Mozart/SConscript rename input/mutopia/W.A.Mozart/{mozart-hrn3-allegro.ly => mozart-hrn3-allegro.ily} (99%) rename input/mutopia/W.A.Mozart/{mozart-hrn3-defs.ly => mozart-hrn3-defs.ily} (100%) rename input/mutopia/W.A.Mozart/{mozart-hrn3-romanze.ly => mozart-hrn3-romanze.ily} (98%) rename input/mutopia/W.A.Mozart/{mozart-hrn3-rondo.ly => mozart-hrn3-rondo.ily} (98%) create mode 100644 vim/SConscript diff --git a/ChangeLog b/ChangeLog index 4ca033668e..e938d6a8d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,28 @@ +2004-07-15 Jan Nieuwenhuizen + + * lily/slur.cc: Add quant-score to interface. Fixes web build. + + * python/SConscript: + * python/vim: + * input/mutopia/*SConscript: New file. + + * input/mutopia/W.A.Mozart/: Use .ily suffix for includes. + + * scm/define-grobs.scm (all-grob-descriptions): Use ,Slur::height, + fixes web build. + + * make/stepmake.make (scons): re-route to SCONS if user has been + running scons in this tree. + + * SConstruct (config_vars): Add CPPDEFINES. + (env): Set checksums type to "content". + (save_config_cache): Do not exit after configuring when using + checksums (the default) instead of timestamps. + 2004-07-15 Jan Nieuwenhuizen * SConstruct: Further development. - + * input/test/SConscript: * input/template/SConscript: * input/regression/SConscript: diff --git a/Documentation/user/SConscript b/Documentation/user/SConscript index cc9c31808f..4edf778bac 100644 --- a/Documentation/user/SConscript +++ b/Documentation/user/SConscript @@ -7,7 +7,10 @@ Import ('env') telys = env['glob'] (env, '*.tely') pngs = env['glob'] (env, '*.png') -env.Depends ('lilypond.texi', env['LILYPOND_BIN']) +# We need lily and mf to build these. +env.Depends ('lilypond.texi', ['#/lily', '#/mf']) +env.Depends ('music-glossary.texi', ['#/lily', '#/mf']) + env.Depends ('lilypond.texi', 'lilypond-internals.texi') epss = map (env.Png2eps, pngs) @@ -39,22 +42,24 @@ def file_subst (file_name, find, subst): h.close () e['usersrc'] = Dir ('.').srcnode ().abspath +e['userout'] = Dir ('.').abspath def url_fixup (target, source, env): file_subst (str (target[0]), '../lilypond-internals', 'lilypond-internals/') -a = ['$MAKEINFO -I$srcdir/Documenation/user -I${SOURCE.dir} --html \ ---css-include=$srcdir/Documentation/texinfo.css $__verbose \ ---output=${TARGET.dir} $SOURCE', - '$MAKEINFO -I$srcdir/Documentation/user -I${SOURCE.dir} --html \ + +a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \ + --css-include=$srcdir/Documentation/texinfo.css $__verbose \ + --output=${TARGET.dir} $SOURCE', + '$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \ --no-split --no-headers \ - --css-include=$srcdir/Documentation/../texinfo.css $__verbose \ + --css-include=$srcdir/Documentation/texinfo.css $__verbose \ --output=$TARGET $SOURCE', url_fixup, - 'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/'] - + 'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/',] + e.Command ('lilypond/lilypond.html', 'lilypond.texi', a) e.Command ('lilypond-internals/lilypond-internals.html', - 'lilypond-internals.texi', a) + 'lilypond-internals.texi', a) #Hmm -- why not just mv ./Documentation/{*,*/*} ./doc :-) env.Alias ('doc', texis) diff --git a/SConstruct b/SConstruct index edb2701849..2a74c24dfe 100644 --- a/SConstruct +++ b/SConstruct @@ -41,6 +41,11 @@ Options (see scons -h) scons build=DIR # clean scrdir build, output below DIR scons out=DIR # write output for alterative config to DIR +Debugging + scons --debug=dtree + scons --debug=explain + scons verbose=1 + Optional custom.py import os @@ -55,15 +60,20 @@ prefix=os.path.join (os.environ['HOME'], 'usr', 'pkg', 'lilypond') # TODO: -# * add missing dirs: -# - input/mutopia -# - vim +# * install doc + # * more program configure tests (mfont, ...?) +# * split doc target: doc input examples mutopia? + # * more fine-grained config.hh -- move lilypondprefix to version.hh? # - config.hh: changes after system upgrades, affects all files # - version.hh: prefix, version etc? affects few +# - what about GUILE_*_VERSION, seems to be the major culprit, +# for config.hh dependency escalation. Is the lily-guile.hh +# workaround necessary at all for GUILE > 1.5? + # * grep FIXME $(find . -name 'S*t') @@ -78,17 +88,6 @@ import shutil # duh, we need 0.95.1 EnsureSConsVersion (0, 95) -# SConscripts are only needed in directories where something needs -# to be done, building or installing -subdirs = ['flower', 'lily', 'mf', 'scm', 'ly', - 'scripts', 'elisp', 'buildscripts', 'po', - 'Documentation', 'Documentation/user', 'Documentation/topdocs', - 'Documentation/bibliography', - 'input', 'input/regression', 'input/test', 'input/template', - 'cygwin', 'debian', - ] - - usage = r'''Usage: scons [KEY=VALUE].. [TARGET|DIR].. @@ -98,12 +97,13 @@ TARGETS: clean, config, doc, dist, install, mf-essential, po-update, ''' -config_cache = 'config.cache' +config_cache = 'scons.cache' -config_vars = ( +config_vars = [ 'BASH', - 'CFLAGS', + 'CCFLAGS', 'CPPPATH', + 'CPPDEFINES', 'CXXFLAGS', 'DEFINES', 'LIBS', @@ -111,7 +111,7 @@ config_vars = ( 'METAFONT', 'PERL', 'PYTHON', - ) + ] # Put your favourite stuff in custom.py opts = Options ([config_cache, 'custom.py'], ARGUMENTS) @@ -152,13 +152,13 @@ for key in ['LD_LIBRARY_PATH', 'GUILE_LOAD_PATH', 'PKG_CONFIG_PATH']: env = Environment ( ENV = ENV, - + BASH = '/bin/bash', - MAKEINFO = 'LANG= makeinfo', PERL = '/usr/bin/perl', PYTHON = '/usr/bin/python', SH = '/bin/sh', - + + MAKEINFO = 'LANG= makeinfo', ABC2LY_PY = srcdir + '/scripts/abc2ly.py', LILYPOND_BOOK = srcdir + '/scripts/lilypond-book.py', LILYPOND_BOOK_FLAGS = '', @@ -170,21 +170,25 @@ env = Environment ( 'usr/pkg/gnome/lib'), os.path.join (os.environ['HOME'], 'usr/pkg/pango/lib')], + GZIP='-9v', MFMODE = 'ljfour', TEXINFO_PAPERSIZE_OPTION = '-t @afourpaper', TOPLEVEL_VERSION = version, ) -Help (usage + opts.GenerateHelpText (env)) - # Add all config_vars to opts, so that they will be read and saved # together with the other configure options. map (lambda x: opts.AddOptions ((x,)), config_vars) + +Help (usage + opts.GenerateHelpText (env)) + opts.Update (env) -env['checksums'] = 1 +# Using content checksums prevents rebuilds after [re]configure if +# config.hh has not changed. if env['checksums']: SetOption ('max_drift', 0) + TargetSignatures ("content") absbuild = Dir (env['build']).abspath outdir = os.path.join (Dir (env['build']).abspath, env['out']) @@ -220,16 +224,17 @@ env.Append ( ) if env['debugging']: - env.Append (CFLAGS = '-g') - env.Append (CXXFLAGS = '-g') + env.Append (CCFLAGS = ['-g', '-pipe']) if env['optimising']: - env.Append (CFLAGS = '-O2') - env.Append (CXXFLAGS = ['-O2', '-DSTRING_UTILS_INLINED']) + env.Append (CCFLAGS = '-O2') + env.Append (CXXFLAGS = ['-DSTRING_UTILS_INLINED']) if env['warnings']: - env.Append (CFLAGS = ['-W', '-Wall']) - # CXXFLAGS = $CFLAGS ... - env.Append (CXXFLAGS = ['-W', '-Wall', '-Wconversion']) + env.Append (CCFLAGS = ['-W', '-Wall']) + env.Append (CXXFLAGS = ['-Wconversion']) + +# ugr,huh? env.Append (LINKFLAGS = ['-Wl,--export-dynamic']) + if env['verbose']: env['__verbose'] = ' --verbose' env['set__x'] = 'set -x;' @@ -262,19 +267,27 @@ if 'realclean' in COMMAND_LINE_TARGETS: if os.path.exists (config_cache): os.unlink (config_cache) Exit (s) - -# Without target arguments, build lily only -if not COMMAND_LINE_TARGETS: - env.Default ('lily') -env.Alias ('all', '.') + +# Declare SConscript phonies +env.Alias ('minimal', config_cache) +env.Alias ('mf-essential', config_cache) + +env.Alias ('minimal', ['lily', 'mf-essential']) +env.Alias ('all', ['minimal', 'mf', '.']) +# Do we want the doc/web separation? env.Alias ('doc', ['Documentation', 'Documentation/user', - 'Documentation/topdocs']) + 'Documentation/topdocs', + 'Documentation/bibliography', + 'input']) -env.Depends ('doc', ['lily', 'mf']) -env.Depends ('input', ['lily', 'mf']) +# Without target arguments, do minimal build +if not COMMAND_LINE_TARGETS: + env.Default (['minimal']) +# GNU Make rerouting compat: +env.Alias ('web', 'doc') def list_sort (lst): sorted = lst @@ -306,6 +319,19 @@ def configure (target, source, env): lst.append ((description, package, minimal, program, string.join (actual, '.'))) + for i in ['bash', 'perl', 'python', 'sh']: + sys.stdout.write ('Checking for %s... ' % i) + c = WhereIs (i) + key = string.upper (i) + if c: + env[key] = c + sys.stdout.write (c) + else: + sys.stdout.write ('not found: %s (using: %s)' \ + % (c, env[key])) + # Hmm? abort? + sys.stdout.write ('\n') + required = [] test_program (required, 'gcc', '2.8', 'GNU C compiler', 'gcc') test_program (required, 'g++', '3.0.5', 'GNU C++ compiler', 'g++') @@ -347,8 +373,8 @@ def configure (target, source, env): : CheckYYCurrentBuffer }) defines = { - 'DIRSEP' : "'/'", - 'PATHSEP' : "':'", + 'DIRSEP' : "'%s'" % os.sep, + 'PATHSEP' : "'%s'" % os.pathsep, 'TOPLEVEL_VERSION' : '"' + version + '"', 'PACKAGE': '"' + package.name + '"', 'DATADIR' : '"' + sharedir + '"', @@ -456,25 +482,17 @@ def uniquify (lst): n -= 1 return lst +def uniquify_config_vars (env): + for i in config_vars: + if env.has_key (i) and type (env[i]) == type ([]): + env[i] = uniquify (env[i]) def save_config_cache (env): ## FIXME: Is this smart, using option cache for saving ## config.cache? I cannot seem to find the official method. - for i in config_vars: - if env.has_key (i) and type (env[i]) == type ([]): - env[i] = uniquify (env[i]) + uniquify_config_vars (env) opts.Save (config_cache, env) - ## FIXME: Something changes in the ENVironment that triggers - ## rebuild of everything if we continue after configuring. - ## Maybe there's a variable missing from config_vars? - - ## How to print and debug the reasons scons has for rebuilding - ## a target (make --debug)? - - ## heet van de naald: - ## - Add a --debug=explain option that reports the reason(s) why SCons - if 'config' in COMMAND_LINE_TARGETS: sys.stdout.write ('\n') sys.stdout.write ('LilyPond configured') @@ -484,7 +502,11 @@ def save_config_cache (env): sys.stdout.write (' scons [TARGET|DIR]...') sys.stdout.write ('\n') Exit (0) - elif 1: #not env['checksums']: + elif not env['checksums']: + # When using timestams, config.hh is NEW. The next + # build triggers recompilation of everything. Exiting + # here makes SCons use the actual timestamp for config.hh + # and prevents recompiling everything the next run. command = sys.argv[0] + ' ' + string.join (COMMAND_LINE_TARGETS) sys.stdout.write ('Running %s ... ' % command) sys.stdout.write ('\n') @@ -502,6 +524,9 @@ if not os.path.exists (config_cache) \ > os.stat (config_cache)[stat.ST_MTIME]): env = configure (None, None, env) save_config_cache (env) +elif env['checksums']: + # just save everything + save_config_cache (env) env.Command (version_hh, '#/VERSION', '$PYTHON ./stepmake/bin/make-version.py VERSION > $TARGET') @@ -513,7 +538,8 @@ env.Append ( LILYPONDPREFIX = os.path.join (run_prefix, 'share/lilypond'), LIBPATH = [os.path.join (absbuild, 'flower', env['out']),], - CPPPATH = [outdir, '#',], + ##CPPPATH = [outdir, '#',], # do not read auto*'s header + CPPPATH = [outdir, ], LILYPOND_BIN = os.path.join (absbuild, 'lily', env['out'], 'lilypond-bin'), LILYPOND_BOOK_PATH = ['.', '#/input', '#/input/regression', @@ -621,8 +647,16 @@ def cvs_files (dir): files = map (lambda x: x[1:x[1:].index ('/')+1], file_entries) return map (lambda x: os.path.join (dir, x), files) -#subdirs = reduce (lambda x, y: x + y, cvs_dirs ('.')) -#print `subdirs` +def flatten (tree, lst): + if type (tree) == type ([]): + for i in tree: + if type (i) == type ([]): + flatten (i, lst) + else: + lst.append (i) + return lst + +subdirs = flatten (cvs_dirs ('.'), []) readme_files = ['AUTHORS', 'README', 'INSTALL', 'NEWS'] foo = map (lambda x: env.TXT (x + '.txt', os.path.join ('Documentation/topdocs', x)), @@ -653,12 +687,40 @@ patch = env.PATCH (patch_name, tar_ball) env.Depends (patch_name, dist_ball) env.Alias ('release', patch) +#### web +web_base = os.path.join (outdir, 'web') +web_ball = os.path.join (web_base, '.tar.gz') +env['footify'] = 'MAILADDRESS=bug-lilypond@gnu.org $PYTHON stepmake/bin/add-html-footer.py --name=lilypond --version=$version' +env['web_ext'] = ['.html', '.ly', '.midi', '.pdf', '.png', '.ps.gz', '.txt',] + +# compatible make heritits +# fixme: generate in $outdir is cwd/builddir +env.Command (web_ball, 'doc', + ['$PYTHON buildscripts/mutopia-index.py -o examples.html ./', + 'cd $absbuild && $footify $$ (find . -name "*.html" -print)', + # uhg? + 'cd $absbuild && rm -f $$(find . -name "*.html~" -print)', + 'cd $absbuild && find Documentation input \ + -path foo $web_path -false \ + > $outdir/weblist', + '''echo '' > $absbuild/index.html''', + '''echo 'Redirecting to the documentation index...' >> $absbuild/index.html''', + # UGHR? all .html cruft in cwd goes into the web ball? + 'cd $absbuild && ls *.html >> $outdir/weblist', + 'cat $outdir/weblist | (cd $absbuild; \ + GZIP=-9v tar -czf $web_ball -T -)',]) +env.Alias ('web', web_ball) + +#### tags env.Append ( ETAGSFLAGS = ["""--regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/'""", """--regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/'"""]) # filter-out some files? env.Command ('TAGS', src_files, 'etags $ETAGSFLAGS $SOURCES') + +# Note: SConscripts are only needed in directories where something needs +# to be done, building or installing for d in subdirs: if os.path.exists (os.path.join (d, 'SConscript')): b = os.path.join (env['build'], d, env['out']) @@ -667,3 +729,4 @@ for d in subdirs: if os.path.abspath (b) != os.path.abspath (d): env.BuildDir (b, d, duplicate = 0) SConscript (os.path.join (b, 'SConscript')) + diff --git a/buildscripts/builder.py b/buildscripts/builder.py index 876eb580d4..229ed1c344 100644 --- a/buildscripts/builder.py +++ b/buildscripts/builder.py @@ -16,6 +16,8 @@ def join_path (path, infix=os.pathsep, prefix = ''): return x return string.join (map (lambda x: prefix + dir (x), path), infix) +env['join_path'] = join_path + env['MAKEINFO_INCLUDES'] = join_path (env['MAKEINFO_PATH'], '', ' -I') a = '$MAKEINFO $__verbose $MAKEINFO_INCLUDES --no-split --no-headers \ --output=$TARGET $SOURCE' @@ -89,9 +91,9 @@ def add_ps_target (target, source, env): return (target + [base + '.ps'], source) a = '${set__x}LILYPONDPREFIX=$LILYPONDPREFIX \ -$PYTHON $LILYPOND_PY${__verbose}\ +$PYTHON $LILYPOND_PY${__verbose} \ --include=${TARGET.dir} \ ---output=${TARGET.base} $SOURCE' +--output=${TARGET.base} $SOURCE' lilypond = Builder (action = a, suffix = '.pdf', src_suffix = '.ly') ## emitter = add_ps_target) env.Append (BUILDERS = {'LilyPond': lilypond}) @@ -240,3 +242,38 @@ a = '$PYTHON $srcdir/buildscripts/lys-to-tely.py \ --name=${TARGET.base} --title="$TITLE" $SOURCES' LYS2TELY = Builder (action = a, suffix = '.tely', src_suffix = '.ly') env.Append (BUILDERS = {'LYS2TELY': LYS2TELY}) + + +def mutopia (ly = None, abc = None): + if not abc: + abc = env['glob'] (env, '*.abc') + if not ly: + ly = env['glob'] (env, '*.ly') + map (env.ABC, abc) + pdf = map (env.LilyPond, ly) + # We need lily and mf to build these. + env.Depends (pdf, ['#/lily', '#/mf']) + env.Alias ('doc', pdf) + +env['mutopia'] = mutopia + + +def collate (title = 'collated files'): + ly = env['glob'] (env, '*.ly') + e = env.Copy ( + TITLE = title, + LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin --header=texidoc -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) #t)'"''', + __verbose = ' --verbose', + ) + # + tely = e.LYS2TELY ('collated-files', ly) + texi = e.TEXI (tely) + # We need lily and mf to build these. + env.Depends (texi, ['#/lily', '#/mf']) + dvi = e.Texi2dvi (texi) + pdf = e.Dvi2pdf (dvi) + html = e.HTML (texi) + + env.Alias ('doc', pdf) + env.Alias ('doc', html) + +env['collate'] = collate diff --git a/elisp/SConscript b/elisp/SConscript index 4587ff100f..665e871af6 100644 --- a/elisp/SConscript +++ b/elisp/SConscript @@ -1,15 +1,16 @@ # -*-python-*- -import os - Import ('env') -sources = env['src_glob'] (env, '*.el') + ['lilypond-words'] -#gen_files = map (lambda x: os.path.splitext (x)[0], sources) -#gens = map (env.AT, sources) +sources = env['src_glob'] (env, '*.el') + ['lilypond-words.el'] e = env.Copy () a = '$PYTHON $srcdir/buildscripts/lilypond-words.py --el --dir=${TARGET.dir}' -e.Command ('lilypond-words.el', '#/lily/my-lily-lexer.cc', a) +e.Command ('lilypond-words.el', + ['#/lily/my-lily-lexer.cc', + '#/buildscripts/lilypond-words.py', + '#/scm/new-markup.scm', + '#/ly/engraver-init.ly',], + a) dir = env['sharedir_package_version'] + '/elisp' env.Install (dir, sources) diff --git a/input/SConscript b/input/SConscript index 39e024c25b..3676edb050 100644 --- a/input/SConscript +++ b/input/SConscript @@ -1,7 +1,4 @@ # -*-python-*- Import ('env') -abcs = env['glob'] (env, '*.abc') -lys = env['glob'] (env, '*.ly') + map (env.ABC, abcs) -pdfs = map (env.LilyPond, lys) -env.Alias ('doc', pdfs) +env['mutopia'] () diff --git a/input/mutopia/E.Satie/SConscript b/input/mutopia/E.Satie/SConscript new file mode 100644 index 0000000000..3676edb050 --- /dev/null +++ b/input/mutopia/E.Satie/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env') +env['mutopia'] () diff --git a/input/mutopia/F.Schubert/SConscript b/input/mutopia/F.Schubert/SConscript new file mode 100644 index 0000000000..3676edb050 --- /dev/null +++ b/input/mutopia/F.Schubert/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env') +env['mutopia'] () diff --git a/input/mutopia/J.S.Bach/SConscript b/input/mutopia/J.S.Bach/SConscript new file mode 100644 index 0000000000..3676edb050 --- /dev/null +++ b/input/mutopia/J.S.Bach/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env') +env['mutopia'] () diff --git a/input/mutopia/R.Schumann/SConscript b/input/mutopia/R.Schumann/SConscript new file mode 100644 index 0000000000..3676edb050 --- /dev/null +++ b/input/mutopia/R.Schumann/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env') +env['mutopia'] () diff --git a/input/mutopia/SConscript b/input/mutopia/SConscript new file mode 100644 index 0000000000..3676edb050 --- /dev/null +++ b/input/mutopia/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env') +env['mutopia'] () diff --git a/input/mutopia/W.A.Mozart/SConscript b/input/mutopia/W.A.Mozart/SConscript new file mode 100644 index 0000000000..dcfd1348c8 --- /dev/null +++ b/input/mutopia/W.A.Mozart/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env') +env['mutopia'] (ly = ['mozart-hrn-3']) diff --git a/input/mutopia/W.A.Mozart/mozart-hrn-3.ly b/input/mutopia/W.A.Mozart/mozart-hrn-3.ly index 02a3dafdf0..aa670c6564 100644 --- a/input/mutopia/W.A.Mozart/mozart-hrn-3.ly +++ b/input/mutopia/W.A.Mozart/mozart-hrn-3.ly @@ -46,10 +46,10 @@ virtuoso that taught in Geneva. \version "2.3.4" -\include "mozart-hrn3-defs.ly" -\include "mozart-hrn3-allegro.ly" -\include "mozart-hrn3-romanze.ly" -\include "mozart-hrn3-rondo.ly" +\include "mozart-hrn3-defs.ily" +\include "mozart-hrn3-allegro.ily" +\include "mozart-hrn3-romanze.ily" +\include "mozart-hrn3-rondo.ily" diff --git a/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ly b/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ily similarity index 99% rename from input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ly rename to input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ily index a1dbdcfd5c..d6c47d5b7a 100644 --- a/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ly +++ b/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ily @@ -1,5 +1,5 @@ \version "2.3.4" -\include "mozart-hrn3-defs.ly" +\include "mozart-hrn3-defs.ily" allegro = diff --git a/input/mutopia/W.A.Mozart/mozart-hrn3-defs.ly b/input/mutopia/W.A.Mozart/mozart-hrn3-defs.ily similarity index 100% rename from input/mutopia/W.A.Mozart/mozart-hrn3-defs.ly rename to input/mutopia/W.A.Mozart/mozart-hrn3-defs.ily diff --git a/input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ly b/input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ily similarity index 98% rename from input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ly rename to input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ily index 3ef82ba3b4..15c344bae5 100644 --- a/input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ly +++ b/input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ily @@ -1,5 +1,5 @@ \version "2.3.4" -\include "mozart-hrn3-defs.ly" +\include "mozart-hrn3-defs.ily" romanze = \relative c' { \key f \major diff --git a/input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ly b/input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ily similarity index 98% rename from input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ly rename to input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ily index 31503fd4d7..8e65b02184 100644 --- a/input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ly +++ b/input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ily @@ -1,6 +1,6 @@ \version "2.3.4" -% \include "mozart-hrn3-defs.ly" +% \include "mozart-hrn3-defs.ily" rondotheme = \relative c' { c'8[ c c] c[ c c] diff --git a/input/regression/SConscript b/input/regression/SConscript index 42e8c4c188..01a8c28fe5 100644 --- a/input/regression/SConscript +++ b/input/regression/SConscript @@ -1,21 +1,4 @@ # -*-python-*- Import ('env') -#lys = env['src_glob'] (env, '*.ly') -lys = env['glob'] (env, '*.ly') - -e = env.Copy ( - TITLE = 'LilyPond Regression Tests', - LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin --header=texidoc -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) #t)'"''', - __verbose = ' --verbose', - ) - -tely = e.LYS2TELY ('collated-files', lys) -texi = e.TEXI (tely) -pdf = e.PDF (texi) -html = e.PDF (texi) - -env.Alias ('doc', pdf) -env.Alias ('doc', html) - - +env['collate'] (title = 'LilyPond Regression Tests') diff --git a/input/template/SConscript b/input/template/SConscript index ee2f171547..c125930a2c 100644 --- a/input/template/SConscript +++ b/input/template/SConscript @@ -1,21 +1,4 @@ # -*-python-*- Import ('env') -#lys = env['src_glob'] (env, '*.ly') -lys = env['glob'] (env, '*.ly') - -e = env.Copy ( - TITLE = 'LilyPond Template Files', - LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin --header=texidoc -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) #t)'"''', - __verbose = ' --verbose', - ) - -tely = e.LYS2TELY ('collated-files', lys) -texi = e.TEXI (tely) -pdf = e.PDF (texi) -html = e.PDF (texi) - -env.Alias ('doc', pdf) -env.Alias ('doc', html) - - +env['collate'] (title = 'LilyPond Template Files') diff --git a/input/test/SConscript b/input/test/SConscript index fd39ce4a2c..ca15d0a64f 100644 --- a/input/test/SConscript +++ b/input/test/SConscript @@ -1,21 +1,4 @@ # -*-python-*- Import ('env') -#lys = env['src_glob'] (env, '*.ly') -lys = env['glob'] (env, '*.ly') - -e = env.Copy ( - TITLE = 'LilyPond Tips and Tricks', - LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin --header=texidoc -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) #t)'"''', - __verbose = ' --verbose', - ) - -tely = e.LYS2TELY ('collated-files', lys) -texi = e.TEXI (tely) -pdf = e.PDF (texi) -html = e.PDF (texi) - -env.Alias ('doc', pdf) -env.Alias ('doc', html) - - +env['collate'] (title = 'LilyPond Tips and Tricks') diff --git a/input/test/new-slur.ly b/input/test/new-slur.ly index 8b674c76d0..d6bd119e0b 100644 --- a/input/test/new-slur.ly +++ b/input/test/new-slur.ly @@ -1,13 +1,21 @@ + +%{ + +breaks web \paper { raggedright = ##t } +%} \relative { +%{ broken + \override Slur #'after-line-breaking-callback = #New_slur::after_line_breaking \override Slur #'print-function = #New_slur::print \override Slur #'height = ##f +%} f'=''16( e) d( c) c'=''2(~c8 d16 c b8 a) f='4 @@ -23,3 +31,4 @@ c,,^( c') } + diff --git a/lily/SConscript b/lily/SConscript index 2da49d683a..69d7b4fee2 100644 --- a/lily/SConscript +++ b/lily/SConscript @@ -27,6 +27,7 @@ e.HH ('parser.hh', 'parser.yy') e.Append (LIBS = ['flower']) e.ParseConfig ('guile-config link') + name = 'lilypond-bin' lily = e.Program (name, sources) env.Install (env['bindir'], lily) diff --git a/lily/slur.cc b/lily/slur.cc index baaa56ec29..c63cfce064 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -697,5 +697,5 @@ Slur::get_curve (Grob*me) ADD_INTERFACE (Slur,"slur-interface", "A slur", - "attachment attachment-offset beautiful control-points dashed details de-uglify-parameters direction extremity-function extremity-offset-alist height-limit note-columns ratio slope-limit thickness y-free"); + "attachment attachment-offset beautiful control-points dashed details de-uglify-parameters direction extremity-function extremity-offset-alist height-limit note-columns ratio slope-limit thickness y-free quant-score"); diff --git a/make/stepmake.make b/make/stepmake.make index 666099ee2e..250b61b8ec 100644 --- a/make/stepmake.make +++ b/make/stepmake.make @@ -1,5 +1,39 @@ # make/Stepmake.make +# If not m (make m=m), reroute to scons if user is using that. +ifndef m + +SCONS_USER = $(wildcard $(depth)/.sconsign) +ifeq ($(SCONS_USER),) +SCONS_USER = $(wildcard $(depth)/.sconf_temp) +endif +ifneq ($(SCONS_USER),) + +ifeq ($(strip $(depth)),..) +here = $(notdir $(CURDIR)) +else +ifeq ($(strip $(depth)),../..) +# ZUCHT? +# here = $(notdir $(dir $(CURDIR)))/$(notdir $(CURDIR)) +here = $(shell basename $$(dirname $(CURDIR)))/$(notdir $(CURDIR)) +endif +endif + +MAKE_TARGETS = config deb diff dist distclean doc release po \ +po-replace po-update all clean check default exe help install lib web \ +web-install web-clean TAGS + +$(MAKE_TARGETS): scons + +# To make this trickery complete, we could have ./configure remove +# traces of scons configuration. +scons: + @echo "warning: $(SCONS_USER) detected, rerouting to scons" + cd $(depth) && scons $(here) $(MAKECMDGOALS) + false +endif +endif + include $(depth)/make/toplevel-version.make # Use alternate configurations alongside eachother: diff --git a/mf/SConscript b/mf/SConscript index e016524368..cd7a01cacc 100644 --- a/mf/SConscript +++ b/mf/SConscript @@ -2,7 +2,6 @@ import os Import ('env') -#sources = env['src_glob'] (env, '*.mf') sources = env['glob'] (env, '*.mf') fonts = reduce (lambda x, y: x + y, @@ -13,24 +12,21 @@ fonts = reduce (lambda x, y: x + y, 'feta-nummer*[0-9].mf', 'parmesan[0-9]*.mf',))) -env.Depends ('mf', 'mf-essential') -stems = fonts #map (lambda x: os.path.splitext (x)[0], fonts) +t = map (env.TFM, fonts) +a = map (env.AFM, fonts) +p = map (env.PFA, fonts) -t = map (env.TFM, stems) -a = map (env.AFM, stems) -p = map (env.PFA, stems) - -map (lambda x: env.Depends (x + '.pfa', x + '.enc'), stems) +map (lambda x: env.Depends (x + '.pfa', x + '.enc'), fonts) mf_essential = ['feta16', 'feta20', 'parmesan16', ] pfa_essential = map (env.PFA, mf_essential) -env.Alias ('mf-essential', pfa_essential) - -env.Alias ('mf', 'mf-essential') - env.Command ('cmr.enc', 'cmr.enc.in', 'cp $SOURCE $TARGET') +env.Alias ('mf-essential', pfa_essential) env.Alias ('mf', 'cmr.enc') -env.Alias ('mf', p) + +# build essential stuff first, that's friendlier +#env.Depends (mf', pfa_essential) +env.Alias ('mf', pfa_essential + p) tfmdir = os.path.join (env['lilypondprefix'], 'fonts/tfm') afmdir = os.path.join (env['lilypondprefix'], 'afm') diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 588ff691d8..57d5c0b92f 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -839,8 +839,9 @@ (extremity-offset-alist . ,default-slur-extremity-offset-alist) (de-uglify-parameters . (1.5 0.8 -2.0)) (Y-extent-callback . - ; ,#f) - Slur::height) + ;; ,#f) + ;; must be of type procedure + ,Slur::height) (height-limit . 2.0) (ratio . 0.333) (beautiful . 0.5) diff --git a/vim/SConscript b/vim/SConscript new file mode 100644 index 0000000000..9f6694e0ad --- /dev/null +++ b/vim/SConscript @@ -0,0 +1,16 @@ +# -*-python-*- + +Import ('env') +sources = env['src_glob'] (env, '*.vim') + ['lilypond-words.vim'] + +e = env.Copy () +a = '$PYTHON $srcdir/buildscripts/lilypond-words.py --words --vim --dir=${TARGET.dir}' +e.Command ('lilypond-words.vim', + ['#/lily/my-lily-lexer.cc', + '#/buildscripts/lilypond-words.py', + '#/scm/new-markup.scm', + '#/ly/engraver-init.ly',], + a) + +dir = env['sharedir_package_version'] + '/vim' +env.Install (dir, sources) -- 2.39.5