]> git.donarmstrong.com Git - lilypond.git/commitdiff
* SConstruct: Further development.
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 15 Jul 2004 01:33:10 +0000 (01:33 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 15 Jul 2004 01:33:10 +0000 (01:33 +0000)
* input/test/SConscript:
* input/template/SConscript:
* input/regression/SConscript:
* Documentation/bibliography/SConscript:
* Documentation/bibliography/index.html.in: New file.

* Documentation/bibliography/GNUmakefile (local-WWW): Remove index
generation.

* buildscripts/builder.py: Add new builders.

* make/stepmake.make:
* stepmake/stepmake/*.make:
* configure.in:
* lily/*:
* flower*: Use config.hh (Was config.h).

* scm/encoding.scm (get-coding): Print friendly error message when
no encoding is found, rather than crashing.

40 files changed:
ChangeLog
Documentation/bibliography/GNUmakefile
Documentation/bibliography/SConscript [new file with mode: 0644]
Documentation/bibliography/index.html.in [new file with mode: 0644]
Documentation/user/SConscript
SConstruct
buildscripts/builder.py
configure.in
flower/SConscript
flower/file-name.cc
flower/file-path.cc
flower/getopt-long.cc
flower/include/libc-extension.hh
flower/international.cc
input/SConscript
input/regression/SConscript [new file with mode: 0644]
input/template/SConscript [new file with mode: 0644]
input/test/SConscript [new file with mode: 0644]
lily/SConscript
lily/all-font-metrics.cc
lily/bezier.cc
lily/includable-lexer.cc
lily/include/lily-guile.hh
lily/include/pangofc-afm-decoder.hh
lily/kpath.cc
lily/lily-version.cc
lily/main.cc
lily/pangofc-afm-decoder.cc
lily/source-file.cc
make/stepmake.make
mf/SConscript
po/SConscript
python/GNUmakefile
scm/encoding.scm
scripts/SConscript
stepmake/stepmake/executable-rules.make
stepmake/stepmake/generic-targets.make
stepmake/stepmake/library-rules.make
stepmake/stepmake/shared-library-rules.make
stepmake/stepmake/toplevel-targets.make

index 5c05f0d1d0c0d0bfba3870b7a45c97dcf20e3079..4ca033668e11f50a72ef676710003064daa90bc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2004-07-15  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * SConstruct: Further development.
+       
+       * input/test/SConscript: 
+       * input/template/SConscript: 
+       * input/regression/SConscript: 
+       * Documentation/bibliography/SConscript:
+       * Documentation/bibliography/index.html.in: New file.
+
+       * Documentation/bibliography/GNUmakefile (local-WWW): Remove index
+       generation.
+
+       * buildscripts/builder.py: Add new builders.
+
+       * make/stepmake.make: 
+       * stepmake/stepmake/*.make: 
+       * configure.in:
+       * lily/*:
+       * flower*: Use config.hh (Was config.h).
+
+       * scm/encoding.scm (get-coding): Print friendly error message when
+       no encoding is found, rather than crashing.
+
 2004-07-15  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * lily/new-slur.cc (score_slopes): strong sloping score only when
index af96676e1b8315712be92ce0c94bd9f64dd6794f..1aac8d62e8d4adfce4fb7e8343b13110f7f15850 100644 (file)
@@ -21,11 +21,7 @@ default:
 GENHTMLS = engraving colorado  computer-notation
 OUTGENHTMLS = $(addprefix $(outdir)/, $(GENHTMLS:%=%.html))
 
-
-local-WWW: $(addprefix $(outdir)/, $(BIB_FILES:.bib=.html))
-       $(PYTHON) $(step-bindir)/ls-latex.py  --title 'References on Music Notation' \
-         $(YO_FILES) $(OUTYO_FILES:.yo=.latex) $(BIB_FILES) $(DOC_FILES) $(TEX_FILES) \
-         | sed "s!$(outdir)/!!g" > $(outdir)/index.html
+local-WWW: $(addprefix $(outdir)/, $(BIB_FILES:.bib=.html) index.html)
 
 $(outdir)/%.bib: %.bib
        ln -f $< $@
diff --git a/Documentation/bibliography/SConscript b/Documentation/bibliography/SConscript
new file mode 100644 (file)
index 0000000..c115efc
--- /dev/null
@@ -0,0 +1,9 @@
+# -*-python-*-
+
+Import ('env')
+bibs = env['src_glob'] (env, '*.bib')
+env.AT_COPY ('index.html.in')
+
+map (env.BIB2HTML, bibs)
+env.Alias ('doc', bibs)
+
diff --git a/Documentation/bibliography/index.html.in b/Documentation/bibliography/index.html.in
new file mode 100644 (file)
index 0000000..22eba08
--- /dev/null
@@ -0,0 +1,28 @@
+<html><title>References on Music Notation</title>
+  <body>
+    <h1> References on Music Notation</h1>
+    <ul>
+      <li>colorado.bib:
+       University of Colorado Engraving music bibliography
+       <p>
+         by Alyssa Lamb (edited & converted to bibtex by HWN)
+       </p>
+       (<a href=colorado.html>HTML</a>)
+      </li>
+      <li>computer-notation.bib:
+       The music notation with computer bibliography
+       <p>
+         by Han-Wen Nienhuys
+       </p>
+       (<a href=computer-notation.html>HTML</a>)
+      </li>
+      <li>engraving.bib:
+       The engraving bibliography
+       <p>
+         by Han-Wen Nienhuys
+       </p>
+       (<a href=engraving.html>HTML</a>)
+      </li>
+    </ul>
+  </body>
+</html>
index 3c1d1d5b9e1bb0956c1c6698be67dd3592535569..cc9c31808f3622ae9a5033b4291535bc0e32caf6 100644 (file)
@@ -13,7 +13,12 @@ env.Depends ('lilypond.texi', 'lilypond-internals.texi')
 epss = map (env.Png2eps, pngs)
 env.Depends ('lilypond.texi', epss)
 
-env.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
+e = env.Copy (
+       LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"''',
+       __verbose = ' --verbose',
+       )
+
+e.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
             'cd ${TARGET.dir} \
             && LILYPONDPREFIX=$LILYPONDPREFIX $LILYPOND_BIN $__verbose \
             $srcdir/ly/generate-documentation')
@@ -26,14 +31,13 @@ infos = map (env.INFO, telys)
 
 def file_subst (file_name, find, subst):
        s = open (file_name).read ()
-       t = string.replace (find, subst, s)
+       t = string.replace (s, find, subst)
        if s != t:
                os.rename (file_name, file_name + '~')
                h = open (file_name, "w")
                h.write (t)
                h.close ()
 
-e = env.Copy ()
 e['usersrc'] = Dir ('.').srcnode ().abspath
 def url_fixup (target, source, env):
        file_subst (str (target[0]),
@@ -52,6 +56,7 @@ e.Command ('lilypond/lilypond.html', 'lilypond.texi', a)
 e.Command ('lilypond-internals/lilypond-internals.html',
             'lilypond-internals.texi', a)
 
+#Hmm -- why not just mv ./Documentation/{*,*/*} ./doc :-)
 env.Alias ('doc', texis)
 env.Alias ('doc', dvis)
 env.Alias ('doc', pss)
index 167ac256386a5535219f905aa4785b33afe3f053..edb27018491a4bd0d822b0e0cc64faf22b12547e 100644 (file)
@@ -1,32 +1,47 @@
 # -*-python-*-
 
 '''
-Experimental scons (www.scons.org) building:
+Experimental scons (www.scons.org) building.
 
-scons TARGET builds from source directory ./TARGET (not recursive)
+Usage
 
+    scons TARGET
 
-Usage:
-    scons
-    scons lily            # build lily
+build from source directory ./TARGET (not recursive)
 
-    LILYPONDPREFIX=out-scons/usr/share/lilypond lily/out-scons/lilypond-bin
-    scons doc             # build web doc
+Configure, build
 
-?    scons fonts           # build all font stuff (split this? )
+    scons [config]             # configure
+    scons                      # build all
 
-    scons config          # reconfigure
+Run from build tree
 
-    scons /               # builds all possible targets
+    run=$(pwd)/out-scons/usr
+    export LOCALE=$run/share/locale
+    export TEXMF='{'$run/share/lilypond,$(kpsexpand '$TEXMF')'}'
+    PATH=$run/bin:$PATH
 
-    scons install
-    scons -c              # clean
-    scons -h              # help
+    #optionally, if you do not use custom.py below
+    #export LILYPONDPREFIX=$run/share/lilypond
 
-    scons build=DIR       # scrdir build, write to new tree =build
-    scons out=DIR         # write output to deeper dir DIR
+    lilypond-bin input/simple
 
-Optionally, make a custom.py.  I have
+Other targets
+    scons mf-essential         # build minimal mf stuff
+
+    scons doc                  # build web doc
+    scons config               # reconfigure
+    scons install              # install
+    scons -c                   # clean
+    scons -h                   # help
+
+    scons /                    # build *everything* (including installation)
+
+Options  (see scons -h)
+    scons build=DIR            # clean scrdir build, output below DIR
+    scons out=DIR              # write output for alterative config to DIR
+
+Optional custom.py
 
 import os
 out='out-scons'
@@ -40,18 +55,17 @@ prefix=os.path.join (os.environ['HOME'], 'usr', 'pkg', 'lilypond')
 
 
 # TODO:
-#   * add missing dirs
-#   * cleanup
+#  * add missing dirs:
+#     - input/mutopia
+#     - vim
+#  * more program configure tests (mfont, ...?)
 
-#   * separate environments?
-#     - compile environment checks headers and libraries
-#     - doc environment checks doc stuff
+#  * 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
+
+#  * grep FIXME $(find . -name 'S*t')
 
-#   * commandline targets:
-#      - clean => -c ?
-#   * more fine-grained config.h -- move lilypondprefix to version.hh?
-#     - config.h:   changes after system upgrades, affects all files
-#     - version.hh:  prefix, version etc?  affects few
 
 import re
 import glob
@@ -61,26 +75,26 @@ import sys
 import stat
 import shutil
 
-# faster but scary: when changing #includes, do scons --implicit-deps-changed
-# SetOption ('implicit_cache', 1)
+# duh, we need 0.95.1
+EnsureSConsVersion (0, 95)
 
 # SConscripts are only needed in directories where something needs
 # to be done, building or installing
-# TODO: Documentation/*, input/*/*, vim, po
-# rename Documentation/* to ./doc?
-
-# somethin's broken wrt config.h checksums?
-FOOSUMS = 1
+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',
+          ]
 
-subdirs = ['flower', 'lily', 'mf', 'scm', 'ly', 'Documentation',
-          'Documentation/user', 'Documentation/topdocs',
-          'input', 'scripts', 'elisp',
-          'buildscripts', 'cygwin', 'debian', 'po']
 
 usage = r'''Usage:
-scons [KEY=VALUE].. [TARGET]..
+scons [KEY=VALUE].. [TARGET|DIR]..
+
+TARGETS: clean, config, doc, dist, install, mf-essential, po-update,
+         realclean, release, tar, TAGS
 
-where TARGET is config|lily|all|fonts|doc|tar|dist|release
 '''
       
 
@@ -93,13 +107,13 @@ config_vars = (
        'CXXFLAGS',
        'DEFINES',
        'LIBS',
+       'LINKFLAGS',
        'METAFONT',
        'PERL',
        'PYTHON',
        )
 
 # Put your favourite stuff in custom.py
-CacheDir ("buildcache")
 opts = Options ([config_cache, 'custom.py'], ARGUMENTS)
 opts.Add ('prefix', 'Install prefix', '/usr/')
 opts.Add ('out', 'Output directory', 'out-scons')
@@ -133,7 +147,7 @@ version = packagepython.version_tuple_to_str (package.version)
 
 ENV = { 'PATH' : os.environ['PATH'] }
 for key in ['LD_LIBRARY_PATH', 'GUILE_LOAD_PATH', 'PKG_CONFIG_PATH']:
-       if os.environ.has_key(key):
+       if os.environ.has_key (key):
                ENV[key] = os.environ[key]
 
 env = Environment (
@@ -163,12 +177,25 @@ env = Environment (
 
 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)
 opts.Update (env)
 
+env['checksums'] = 1
 if env['checksums']:
        SetOption ('max_drift', 0)
 
+absbuild = Dir (env['build']).abspath
+outdir = os.path.join (Dir (env['build']).abspath, env['out'])
+run_prefix = os.path.join (absbuild, os.path.join (env['out'], 'usr'))
+
+CacheDir (os.path.join (outdir, 'build-cache'))
+
+if env['debugging']:
+       # No need to set $LILYPONDPREFIX to run lily, but cannot install...
+       env['prefix'] = run_prefix
+       
 prefix = env['prefix']
 bindir = os.path.join (prefix, 'bin')
 sharedir = os.path.join (prefix, 'share')
@@ -192,48 +219,50 @@ env.Append (
        sharedir_package_version = sharedir_package_version,
        )
 
-env.CacheDir (os.path.join (env['build'], '=build-cache'))
-
 if env['debugging']:
        env.Append (CFLAGS = '-g')
        env.Append (CXXFLAGS = '-g')
 if env['optimising']:
        env.Append (CFLAGS = '-O2')
-       env.Append (CXXFLAGS = '-O2')
-       env.Append (CXXFLAGS = '-DSTRING_UTILS_INLINED')
+       env.Append (CXXFLAGS = ['-O2', '-DSTRING_UTILS_INLINED'])
 if env['warnings']:
-       env.Append (CFLAGS = '-W ')
-       env.Append (CFLAGS = '-Wall')
-       # what about = ['-W', '-Wall', ...]?
-       env.Append (CXXFLAGS = '-W')
-       env.Append (CXXFLAGS = '-Wall')
-       env.Append (CXXFLAGS = '-Wconversion')
+       env.Append (CFLAGS = ['-W', '-Wall'])
+       # CXXFLAGS = $CFLAGS ...
+       env.Append (CXXFLAGS = ['-W', '-Wall', '-Wconversion'])
+env.Append (LINKFLAGS = ['-Wl,--export-dynamic'])
 if env['verbose']:
-       env['__verbose'] = '--verbose'
+       env['__verbose'] = ' --verbose'
+       env['set__x'] = 'set -x;'
 
-# Hmm
-#env.Append (ENV = {'PKG_CONFIG_PATH' : string.join (env['PKG_CONFIG_PATH'],
-#                                                  os.pathsep),
-#                 'LD_LIBRARY_PATH' : string.join (env['LD_LIBRARY_PATH'],
-#                                                  os.pathsep),
-#                 'GUILE_LOAD_PATH' : string.join (env['GUILE_LOAD_PATH'],
-#                                                  os.pathsep), })
-
-outdir = os.path.join (Dir (env['build']).abspath, env['out'])
-
-# This is interesting, version.hh is generated automagically, just in
-# time.  Is this a .h /.hh issue?  It seems to be, using config.hh (in
-# flower/file-name.cc) works.  Bug report to SCons or rename to
-# config.hh or both?
-# config_h = os.path.join (outdir, 'config.hh')
-config_h = os.path.join (outdir, 'config.h')
-version_h = os.path.join (outdir, 'version.hh')
+config_hh = os.path.join (outdir, 'config.hh')
+version_hh = os.path.join (outdir, 'version.hh')
 
 env.Alias ('config', config_cache)
 
 
-## Explicit dependencies
+## Explicit target and dependencies
 
+if 'clean' in COMMAND_LINE_TARGETS:
+       # ugh: prevent reconfigure instead of clean
+       os.system ('touch %s' % config_cache)
+       
+       command = sys.argv[0] + ' -c .'
+       sys.stdout.write ('Running %s ... ' % command)
+       sys.stdout.write ('\n')
+       s = os.system (command)
+       if os.path.exists (config_cache):
+               os.unlink (config_cache)
+       Exit (s)
+
+if 'realclean' in COMMAND_LINE_TARGETS:
+       command = 'rm -rf $(find . -name "out-scons" -o -name ".scon*")'
+       sys.stdout.write ('Running %s ... ' % command)
+       sys.stdout.write ('\n')
+       s = os.system (command)
+       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')
@@ -243,10 +272,8 @@ env.Alias ('doc',
            'Documentation/user',
            'Documentation/topdocs'])
 
-env.Depends (['lily', 'flower', 'all', '.'], config_h)
 env.Depends ('doc', ['lily', 'mf'])
 env.Depends ('input', ['lily', 'mf'])
-env.Depends ('doc', ['lily', 'mf'])
 
 
 def list_sort (lst):
@@ -389,7 +416,7 @@ def configure (target, source, env):
                print 'Please install required packages'
                for i in required:
                        print '%s:      %s-%s or newer (found: %s %s)' % i
-               sys.exit (1)
+               Exit (1)
 
        if optional:
                print
@@ -405,26 +432,7 @@ def config_header (target, source, env):
        for i in list_sort (env['DEFINES'].keys ()):
                config.write ('#define %s %s\n' % (i, env['DEFINES'][i]))
        config.close ()
-
-if os.path.exists (config_cache) and 'config' in COMMAND_LINE_TARGETS:
-       os.unlink (config_cache)
-# WTF?
-# scons: *** Calling Configure from Builders is not supported.
-# env.Command (config_cache, None, configure)
-if not os.path.exists (config_cache) \
-   or (os.stat ('SConstruct')[stat.ST_MTIME]
-       > os.stat (config_cache)[stat.ST_MTIME]):
-       env = configure (None, None, env)
-
-       # We 'should' save opts each time, but that makes config.h
-       # always out of date, and that triggers recompiles, even when
-       # using checksums?
-       if FOOSUMS: #not env['checksums']:
-               ## FIXME: Is this smart, using option cache for saving
-               ## config.cache?  I cannot seem to find the official method.
-               map (lambda x: opts.AddOptions ((x,)), config_vars)
-               opts.Save (config_cache, env)
-               env.Command (config_h, config_cache, config_header)
+env.Command (config_hh, config_cache, config_header)
 
 # hmm?
 def xuniquify (lst):
@@ -448,23 +456,55 @@ def uniquify (lst):
                        n -= 1
        return lst
 
-for i in config_vars:
-       if env.has_key (i) and type (env[i]) == type ([]):
-               env[i] = uniquify (env[i])
 
-if not FOOSUMS: #env['checksums']:
+def save_config_cache (env):
        ## FIXME: Is this smart, using option cache for saving
        ## config.cache?  I cannot seem to find the official method.
-       map (lambda x: opts.AddOptions ((x,)), config_vars)
-       
+       for i in config_vars:
+               if env.has_key (i) and type (env[i]) == type ([]):
+                       env[i] = uniquify (env[i])
        opts.Save (config_cache, env)
-       env.Command (config_h, config_cache, config_header)
 
-env.Command (version_h, '#/VERSION',
-            '$PYTHON ./stepmake/bin/make-version.py VERSION > $TARGET')
+       ## 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)?
 
-absbuild = Dir (env['build']).abspath
-run_prefix = os.path.join (absbuild, os.path.join (env['out'], 'usr'))
+       ## 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')
+               sys.stdout.write ('\n')
+               sys.stdout.write ('now run')
+               sys.stdout.write ('\n')
+               sys.stdout.write ('    scons [TARGET|DIR]...')
+               sys.stdout.write ('\n')
+               Exit (0)
+       elif 1: #not env['checksums']:
+               command = sys.argv[0] + ' ' + string.join (COMMAND_LINE_TARGETS)
+               sys.stdout.write ('Running %s ... ' % command)
+               sys.stdout.write ('\n')
+               s = os.system (command)
+               Exit (s)
+
+
+if os.path.exists (config_cache) and 'config' in COMMAND_LINE_TARGETS:
+       os.unlink (config_cache)
+# WTF?
+# scons: *** Calling Configure from Builders is not supported.
+# env.Command (config_cache, None, configure)
+if not os.path.exists (config_cache) \
+   or (os.stat ('SConstruct')[stat.ST_MTIME]
+       > os.stat (config_cache)[stat.ST_MTIME]):
+       env = configure (None, None, env)
+       save_config_cache (env)
+
+env.Command (version_hh, '#/VERSION',
+            '$PYTHON ./stepmake/bin/make-version.py VERSION > $TARGET')
 
 # post-config environment update
 env.Append (
@@ -514,31 +554,46 @@ def symlink_tree (target, source, env):
                        frm = os.path.join (srcdir, src[1:])
                else:
                        depth = len (string.split (dir, '/'))
-                       frm = os.path.join ('../' * depth, src, env['out'])
+                       if src.find ('@') > -1:
+                               frm = os.path.join ('../' * depth,
+                                                   string.replace (src, '@',
+                                                                   env['out']))
+                       else:
+                               frm = os.path.join ('../' * depth, src,
+                                                   env['out'])
+                       if src[-1] == '/':
+                               frm = os.path.join (frm, os.path.basename (dst))
+               if env['verbose']:
+                       print 'ln -s %s -> %s' % (frm, os.path.basename (dst))
                os.symlink (frm, os.path.basename (dst))
        shutil.rmtree (run_prefix)
        prefix = os.path.join (env['out'], 'usr')
        map (lambda x: symlink (x[0], os.path.join (prefix, x[1])),
-            (('python', 'lib/lilypond/python'),
-             # UGHR, lilypond.py uses lilypond-bin from PATH
-             ('lily',   'bin'),
-             ('#mf',    'share/lilypond/fonts/mf'),
-             ('mf',     'share/lilypond/fonts/afm'),
-             ('mf',     'share/lilypond/fonts/tfm'),
-             ('mf',     'share/lilypond/fonts/type1'),
-             ('#tex',   'share/lilypond/tex/source'),
-             ('mf',     'share/lilypond/tex/generate'),
-             ('#ly',    'share/lilypond/ly'),
-             ('#scm',   'share/lilypond/scm'),
-             ('#ps',    'share/lilypond/ps'),
-             ('elisp',  'share/lilypond/elisp')))
+            # ^# := source dir
+            # @  := out
+            # /$ := add dst file_name
+            (('python',     'lib/lilypond/python'),
+             ('lily/',      'bin/lilypond-bin'),
+             ('scripts/',   'bin/lilypond'),
+             ('scripts/',   'bin/lilypond-book'),
+             ('#mf',        'share/lilypond/fonts/mf'),
+             ('mf',         'share/lilypond/fonts/afm'),
+             ('mf',         'share/lilypond/fonts/tfm'),
+             ('mf',         'share/lilypond/fonts/type1'),
+             ('#tex',       'share/lilypond/tex/source'),
+             ('mf',         'share/lilypond/tex/generate'),
+             ('#ly',        'share/lilypond/ly'),
+             ('#scm',       'share/lilypond/scm'),
+             ('#ps',        'share/lilypond/ps'),
+             ('po/@/nl.mo', 'share/locale/nl/LC_MESSAGES/lilypond.mo'),
+             ('elisp',      'share/lilypond/elisp')))
        os.chdir (srcdir)
 
 if env['debugging']:
        stamp = os.path.join (run_prefix, 'stamp')
        env.Command (stamp, 'SConstruct', [symlink_tree, 'touch $TARGET'])
        env.Depends ('lily', stamp)
-
+       
 #### dist, tar
 def plus (a, b):
        a + b
@@ -598,6 +653,12 @@ patch = env.PATCH (patch_name, tar_ball)
 env.Depends (patch_name, dist_ball)
 env.Alias ('release', patch)
 
+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')
+
 for d in subdirs:
        if os.path.exists (os.path.join (d, 'SConscript')):
                b = os.path.join (env['build'], d, env['out'])
index 93b811300c3de6e8f6d070a5928f198bcfd6549a..876eb580d414d6cffeabc6aa95e955de3b96f3d9 100644 (file)
@@ -41,7 +41,7 @@ env.PrependENVPath ('PATH',
 
 if os.environ.has_key ('TEXMF'):
        env.Append (ENV = {'TEXMF' : os.environ['TEXMF']})
-env.Append (ENV = {'TEXMF' : '{' + env['LILYPONDPREFIX'] + ',' \
+env.Append (ENV = {'TEXMF' : '{$LILYPONDPREFIX,' \
                   + os.popen ('kpsexpand \$TEXMF').read ()[:-1] + '}' })
 
 if os.environ.has_key ('LD_LIBRARY_PATH'):
@@ -56,7 +56,7 @@ env.Append (PYTHONPATH = [os.path.join (env['absbuild'], env['out'],
 env.Append (ENV = { 'PYTHONPATH' : string.join (env['PYTHONPATH'],
                                                os.pathsep) } )
 
-a = ['rm -f $$(grep -LF "\lilypondend" ${TARGET.dir}/lily-*.tex 2>/dev/null);',
+a = ['${__set_x}rm -f $$(grep -LF "\lilypondend" ${TARGET.dir}/lily-*.tex 2>/dev/null);',
      'LILYPONDPREFIX=$LILYPONDPREFIX \
      $PYTHON $LILYPOND_BOOK $__verbose \
      --include=${TARGET.dir} $LILYPOND_BOOK_INCLUDES \
@@ -88,19 +88,15 @@ def add_ps_target (target, source, env):
        base = os.path.splitext (str (target[0]))[0]
        return (target + [base + '.ps'], source)
 
-#debug = 'echo "PATH=$$PATH";'
-debug = ''
-a = debug + 'LILYPONDPREFIX=$LILYPONDPREFIX \
-$PYTHON $LILYPOND_PY $__verbose \
+a = '${set__x}LILYPONDPREFIX=$LILYPONDPREFIX \
+$PYTHON $LILYPOND_PY${__verbose}\
 --include=${TARGET.dir} \
 --output=${TARGET.base}  $SOURCE'
 lilypond = Builder (action = a, suffix = '.pdf', src_suffix = '.ly')
 ##                 emitter = add_ps_target)
 env.Append (BUILDERS = {'LilyPond': lilypond})
 
-#verbose = verbose_opt (env, ' --verbose')
-verbose = ''
-a = debug + 'LILYPONDPREFIX=$LILYPONDPREFIX $PYTHON $ABC2LY_PY \
+a = '${set__x}LILYPONDPREFIX=$LILYPONDPREFIX $PYTHON $ABC2LY_PY \
 --strict --output=${TARGET} $SOURCE'
 ABC = Builder (action = a, suffix = '.ly', src_suffix = '.abc')
 env.Append (BUILDERS = {'ABC': ABC})
@@ -212,23 +208,35 @@ def at_copy (target, source, env):
     if os.path.basename (os.path.dirname (str (target[0]))) == 'bin':
            os.chmod (t, 0755)
 
-AT_COPY = Builder (action = at_copy)
+AT_COPY = Builder (action = at_copy, src_suffix = ['.in', '.py', '.sh',])
 env.Append (BUILDERS = {'AT_COPY': AT_COPY})
 
-MO = Builder (action = '$MSGFMT -o $TARGET $SOURCE',
+MO = Builder (action = 'msgfmt -o $TARGET $SOURCE',
              suffix = '.mo', src_suffix = '.po')
 env.Append (BUILDERS = {'MO': MO})
 
-a = 'xgettext --default-domain=lilypond --join \
+ugh =  'ln -f po/lilypond.pot ${TARGET.dir}/lilypond.po; '
+a = ugh + 'xgettext --default-domain=lilypond --join \
 --output-dir=${TARGET.dir} --add-comments \
 --keyword=_ --keyword=_f --keyword=_i $SOURCES'
-POT = Builder (action = a, suffix = '.pot')
-#env.Append (BUILDERS = {'POT': POT})
-#env.Command(env['absbuild'] + '/po/' + env['out'] + '/lilypond.pot',
-env['pottarget'] = os.path.join (env['absbuild'], 'po', env['out'],
-                              'lilypond.pot')
-env['potcommand'] = a
-
-a = 'msgmerge ${SOURCE} ${TARGET.dir}/lilypond.pot -o ${TARGET}'
+PO = Builder (action = a, suffix = '.pot',
+             src_suffix = ['.cc', '.hh', '.py'], multi = 1)
+##env.Append (BUILDERS = {'PO': PO})
+##env.Command(env['absbuild'] + '/po/' + env['out'] + '/lilypond.pot',
+env['potarget'] = os.path.join (env['absbuild'], 'po', env['out'],
+                               'lilypond.pot')
+env['pocommand'] = a
+
+ugh = '; mv ${TARGET} ${SOURCE}'
+a = 'msgmerge ${SOURCE} ${SOURCE.dir}/lilypond.pot -o ${TARGET}' + ugh
 POMERGE = Builder (action = a, suffix = '.pom', src_suffix = '.po')
 env.Append (BUILDERS = {'POMERGE': POMERGE})
+
+a = '$PYTHON $srcdir/buildscripts/bib2html.py -o $TARGET $SOURCE'
+BIB2HTML = Builder (action = a, suffix = '.html', src_suffix = '.bib')
+env.Append (BUILDERS = {'BIB2HTML': BIB2HTML})
+
+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})
index 371d75db0cbd723c5bd20689e4b4f09961ae8ac6..cedc9459bc067be56afb268a074f474194adafc7 100644 (file)
@@ -19,7 +19,7 @@ STEPMAKE_INIT
 AC_CONFIG_SRCDIR([lily/main.cc])
 
 # Move to aclocal.m4?
-AC_CONFIG_HEADER([$CONFIGFILE.h:config.hh.in])
+AC_CONFIG_HEADER([$CONFIGFILE.hh:config.hh.in])
 
 # Uncomment the configuration options your package needs.
 
index 8b7d6e9866c6bfebaaa6b7066704e27b0a41d909..db20306d4861403f83833b07bb9a90a32f3686b2 100644 (file)
@@ -16,7 +16,5 @@ if env['static']:
 if not env['static'] or env['shared']:
        e.SharedLibrary (name, sources)
 
-#pot = env.POT (sources + includes)
-#map (lambda x: e.Depends
-pot = env.Command (env['pottarget'], sources + includes, env['potcommand'])
-env.Alias ('pot', pot)
+po = env.Command ('lilypond.po', sources + includes, env['pocommand'])
+env.Alias ('po-update', po)
index 8043fabc14f2045d1bcbed37e2db4f251e58a63b..5c848efd74cffbe9ed373e7619975a153953efab 100644 (file)
@@ -7,12 +7,12 @@
                  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-//#include "config.hh"
-#include "config.h"
 #include <stdio.h>
 #include <errno.h>
 #include <limits.h>
 
+#include "config.hh"
+
 #if HAVE_SYS_STAT_H 
 #include <sys/stat.h>
 #endif
index c6bd1248aa2dd9be6dd92182148974bbc897ca18..125cf5844b1b2e77d22d155a05deeb559951fee5 100644 (file)
@@ -7,11 +7,11 @@
                  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include "config.h"
 #include <stdio.h>
 #include <errno.h>
 #include <limits.h>
 
+#include "config.hh"
 #if HAVE_SYS_STAT_H 
 #include <sys/stat.h>
 #endif
index 643527c91a679247199722e5f6f9ced65531216f..feb655ab2e753528e1e3de0505d5cc77f213f46e 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <iostream>
 
-#include "config.h"
+#include "config.hh"
 #include "getopt-long.hh"
 #include "international.hh"
 #include "string-convert.hh"
index a5385b4b01f00a834b086e883e189edc16654c71..906e64a4d49503a612e0a9fced9c43e065a472ee 100644 (file)
@@ -6,17 +6,15 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-
 #ifndef LIBC_EXTENSION_HH
 #define LIBC_EXTENSION_HH
 
-#include "flower-proto.hh"
-#include "config.h"
-
-
 #include <cstddef>
 #include <stdarg.h>
 
+#include "config.hh"
+#include "flower-proto.hh"
+
 char* strnlwr (char* start ,int n);
 char* strnupr (char* start, int n);
 
index 9e66e5c69be232d7c3fc555f112c8bcd9b8a854c..a7d09733cb1835a01ebe884b55a3856ba8b57f5a 100644 (file)
@@ -8,7 +8,8 @@
  */
 
 #include <stdarg.h>
-#include "config.h"
+
+#include "config.hh"
 #include "string-convert.hh"
 #include "international.hh"
 
index d497dd2e888b864f70ddc9dc4421d2f79ee95632..39e024c25bb4957de8ce049424e4bb45f8642778 100644 (file)
@@ -1,13 +1,6 @@
 # -*-python-*-
 
-import os
-
 Import ('env')
-#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)
-
 abcs = env['glob'] (env, '*.abc')
 lys = env['glob'] (env, '*.ly') + map (env.ABC, abcs)
 pdfs = map (env.LilyPond, lys)
diff --git a/input/regression/SConscript b/input/regression/SConscript
new file mode 100644 (file)
index 0000000..42e8c4c
--- /dev/null
@@ -0,0 +1,21 @@
+# -*-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)
+
+
diff --git a/input/template/SConscript b/input/template/SConscript
new file mode 100644 (file)
index 0000000..ee2f171
--- /dev/null
@@ -0,0 +1,21 @@
+# -*-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)
+
+
diff --git a/input/test/SConscript b/input/test/SConscript
new file mode 100644 (file)
index 0000000..fd39ce4
--- /dev/null
@@ -0,0 +1,21 @@
+# -*-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)
+
+
index 224b8a4236550116bf79716edc9db37498d2dae3..2da49d683a212c8ea217e720d2f7a85e89133931 100644 (file)
@@ -1,18 +1,29 @@
 # -*-python-*-
 
 Import ('env')
-sources = env['src_glob'] (env, '*.cc') + ['parser.yy', 'lexer.ll']
-includes = env['src_glob'] (env, 'include/*.hh')
+
 outdir = Dir ('.').abspath
+cc_sources =  env['src_glob'] (env, '*.cc')
+sources = cc_sources + ['parser.yy', 'lexer.ll']
+includes = env['src_glob'] (env, 'include/*.hh')
 
 e = env.Copy ()
-e.Append (YACCFLAGS = '-d')
 e.Append (CPPPATH = [outdir, '#/lily/include', '#/flower/include'])
+e.Append (LEXFLAGS = ['-Cfe', '-p', '-p'])
+
+# SCons builds parser.cc and parser.hh automagically with this but
+# keeps removing and rebuilding parser.cc because it wants parser.hpp.
+# e.Append (YACCFLAGS = '-d')
+# e.Depends ('lexer.cc', 'parser.cc')
+# e.Depends ('my-lily-lexer.o', 'parser.cc')
+# e.Depends ('my-lily-parser.o', 'parser.cc')
 
-e.Depends ('lexer.cc', 'parser.cc')
-e.Depends ('my-lily-lexer.o', 'parser.cc')
-e.Depends ('my-lily-parser.o', 'parser.cc')
-map (e.Precious, ['parser.cc', 'lexer.cc', 'parser.hh'])
+# Adding an explicit Builder works well, we do not even need to list
+# header dependencies.
+HH = Builder (action = 'bison -d -o ${TARGET.base}.cc $SOURCE',
+             suffix = '.hh', src_suffix = '.yy')
+e.Append (BUILDERS = {'HH' : HH})
+e.HH ('parser.hh', 'parser.yy')
 
 e.Append (LIBS = ['flower'])
 e.ParseConfig ('guile-config link')
@@ -21,5 +32,5 @@ lily = e.Program (name, sources)
 env.Install (env['bindir'], lily)
 env.Alias ('install', env['bindir'])
 
-#po = e.PO (sources + includes)
-#env.Alias ('po', po)
+po = env.Command ('lilypond.po', cc_sources + includes, env['pocommand'])
+env.Alias ('po-update', po)
index 94655c48c8726e875220751a48592644e5755d8f..52c4bccae20016b3c646266648842c8026d0cebb 100644 (file)
@@ -8,7 +8,7 @@
   
  */
 
-#include "config.h"
+#include "config.hh"
 #include "main.hh"
 #include "all-font-metrics.hh"
 #include "warn.hh"
index 85208ade0708f9347d78a67c124f71dfe2d21fee..d46e63638b13816056bb49a314b7a7ea3f21954d 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <math.h>
 
-#include "config.h"
+#include "config.hh"
 #include "warn.hh"
 #include "libc-extension.hh"
 #include "bezier.hh"
index f6d277440021b54aec82b77841ca368429bc1cb5..cb8dc7d9cbe74d299fbd27fc3294a9795a6988fc 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <sstream>
 
-#include "config.h"
+#include "config.hh"
 
 #include "includable-lexer.hh"
 #include "file-path.hh"
index 0b5e2a01638830af28734121984cc0d5db5b4f48..7c91a85a890cfb6b6ff029af282a91fd009f90ca 100644 (file)
@@ -13,7 +13,7 @@
 /* GUILE only includes version in headers (libguile/version.h) as of
    1.5.x.  For some strange reason, they call it SCM.*VERSION.
 
-   Not including config.h here, saves a lot of unnecessary
+   Not including config.hh here, saves a lot of unnecessary
    recompiles. */
 #include <libguile.h>
 
@@ -23,7 +23,7 @@
 #define GUILE_MINOR_VERSION SCM_MINOR_VERSION
 #define GUILE_PATCH_LEVEL SCM_MICRO_VERSION
 #else
-#include "config.h"
+#include "config.hh"
 #endif
 #endif
 
index cde2830b0bf71d269cc530a42c6625e0657b8080..45a4e48fa93289399f74cd72fc54755b2c2af93a 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef __PANGOFC_AFM_DECODER_H__
 #define __PANGOFC_AFM_DECODER_H__
 
-#include "config.h"
+#include "config.hh"
 #if HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
 
 /* Note: in C and with explicit header for use outside of LilyPond.  */
index 85e1d14127c6410998173cf9644ba54b5592c3f8..2db7be8ee137901798a368380845424c4625130b 100644 (file)
@@ -21,7 +21,7 @@ I found a somewhat more elegant patch for this: Just #include
 
 */
 #include <unistd.h>    
-#include "config.h"
+#include "config.hh"
 
 #define popen REALLYUGLYKLUDGE
 #define pclose ANOTHERREALLYUGLYKLUDGE
index 5d31b3934271f522bd3da30866b855ee65917b64..6bee35d852cd0baa8c97d71f6c37b7f6285bde2a 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1999--2004 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include "config.h"
+#include "config.hh"
 #include "version.hh"
 #include "lily-version.hh"
 
index 74ac10ecd4a071b044e07601dcd1233784a99cd1..e171dfff822f7aebbe11e757745c4b44ca7fd60e 100644 (file)
@@ -12,7 +12,7 @@
 #include <locale.h>
 #include <string.h>
 
-#include "config.h"
+#include "config.hh"
 
 #if HAVE_GETTEXT
 #include <libintl.h>
index c6a587c5ca2145acebf525c68dcb9c299237858c..4f569d29391b04b1225740cab032aaf49b514b68 100644 (file)
@@ -23,7 +23,7 @@
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
 
-#include "config.h"
+#include "config.hh"
 #if HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
 
 /* Need to access to PangoFcFont.full_pattern.  */
index d735fd26ff30359cce0a0061afc62bd4713eae57..f083fedfd3a077e62e0cc48ac4a73a5b1aed7f4f 100644 (file)
@@ -7,7 +7,7 @@
   Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "config.h"
+#include "config.hh"
 
 #include <stdio.h>
 #include <assert.h>
index dee7d048351c3dd8bbd3c5ca873866f1c4831d92..666099ee2e5b3752920f1f1b5d87bb935dd49a61 100644 (file)
@@ -46,7 +46,7 @@ include $(config_make)
 outdir=$(outroot)/$(outbase)
 
 # why not generic ?? 
-config_h=$(builddir)/config$(CONFIGSUFFIX).h
+config_h=$(builddir)/config$(CONFIGSUFFIX).hh
 
 # The outdir that was configured for: best guess to find binaries
 outconfbase=out$(CONFIGSUFFIX)
index 8f7b6017b2c249002b3818498a5943a64daf9a13..e01652436850b13f08a39d18dcd9dd636cdc5e3a 100644 (file)
@@ -1,49 +1,43 @@
 # -*-python-*-
 
-import glob
 import os
-import string
-import sys
-
 Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-sources = glob.glob ('*.mf')
-outdir = os.path.join (env['build'], reldir, env['out'])
-
-#mf_sources = reduce (+,
-mf_sources = reduce (lambda x, y: x + y,
-                    map (glob.glob,
-                         ('feta[0-9]*.mf',
-                          'feta-braces-[a-z].mf',
-                          'feta-din*[0-9].mf',
-                          'feta-nummer*[0-9].mf',
-                          'parmesan[0-9]*.mf',)))
-os.chdir (here)
-
-#mf_sources = ('feta16.mf',)
-#mf_sources = ('feta-braces-a.mf',)
-font_stems = map (lambda x: os.path.splitext (x)[0], mf_sources)
-
-t = map (env.TFM, font_stems)
-a = map (env.AFM, font_stems)
-p = map (env.PFA, font_stems)
-
-map (lambda x: env.Depends (x + '.pfa', x + '.enc'), font_stems)
-#map (lambda x: env.Depends (x + '.pfa', x + '.log'), font_stems)
+#sources = env['src_glob'] (env, '*.mf')
+sources = env['glob'] (env, '*.mf')
+
+fonts = reduce (lambda x, y: x + y,
+               map (lambda x: env['glob'] (env, x),
+                    ('feta[0-9]*.mf',
+                     'feta-braces-[a-z].mf',
+                     'feta-din*[0-9].mf',
+                     '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, stems)
+a = map (env.AFM, stems)
+p = map (env.PFA, stems)
+
+map (lambda x: env.Depends (x + '.pfa', x + '.enc'), stems)
+
+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', 'cmr.enc')
+env.Alias ('mf', p)
 
 tfmdir = os.path.join (env['lilypondprefix'], 'fonts/tfm')
 afmdir = os.path.join (env['lilypondprefix'], 'afm')
 pfadir = os.path.join (env['lilypondprefix'], 'fonts/type1')
-#ti = map (lambda x: env.Install (tfmdir, x[0]), t)
 ti = map (lambda x: env.Install (tfmdir, x), t)
 ai = map (lambda x: env.Install (afmdir, x), a)
 pi = map (lambda x: env.Install (pfadir, x), p)
 env.Alias ('install', tfmdir)
 env.Alias ('install', afmdir)
 env.Alias ('install', pfadir)
-
-map (lambda x: env.Alias ('fonts', x), t + a + p)
-env.Command ('cmr.enc', 'cmr.enc.in', 'cp $SOURCE $TARGET')
-env.Alias ('fonts', 'cmr.enc')
index 07696b62445aca4d41b9d2446a0d021bd963f878..d18c53cdab06f32dc08f9f74659009370eed9b40 100644 (file)
@@ -2,21 +2,15 @@
 
 Import ('env')
 pos = env['glob'] (env, '*.po')
-#pot = env['glob'] (env, '*.pot')
-#pot = 'lilypond'
 mos = map (env.MO, pos)
 dir = env['localedir']
 env.Install (dir, mos)
 env.Alias ('install', dir)
 
-
-
-outdir = Dir ('.').abspath
-env.Depends ('po', 'pot')
-env.Depends ('po', env['pottarget'])
-
-#pots = map (lambda x: outdir + '/' + x + '.po', pos)
-map (lambda x: env.Depends (outdir + '/lilypond.pot', x), pos)
+env.Depends ('po', 'po-update')
+# map (lambda x: env.Depends (x + '.mo', x + '.pom'), pos)
 poms = map (env.POMERGE, pos)
-env.Alias ('po', poms)
+env.Alias ('po-update', poms)
+env.Alias ('po', mos)
+#env.Alias ('all', mos)
 
index b1a0d05439262457baad538f9673a76cd167f878..fbf7aed98553ddc20b77a410fa760bf6d92d8d80 100644 (file)
@@ -13,4 +13,4 @@ INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/python
 INSTALLATION_OUT_FILES1=$(OUT_PY_MODULES) $(OUT_PYC_MODULES)
 
 
-$(outdir)/midi.lo: $(outdir)/config.h
+$(outdir)/midi.lo: $(outdir)/config.hh
index baec2cd2cb9f74c9dcfb88f5103b1011e23e9fcd..0bd6fc91466675beb6354505336ecc9626f3a265 100644 (file)
@@ -100,7 +100,15 @@ vector of symbols."
 
 (define (get-coding coding-name)
   (let ((entry (assoc-get coding-name coding-alist)))
-    (cons (car entry) (force (cdr entry)))))
+    (if entry (cons (car entry) (force (cdr entry)))
+       (if (equal? coding-name "feta-music")
+           (begin
+             (ly:warn "installation problem: deprecated encoding requested: ~S" coding-name)
+             (exit 1))
+       (let ((fallback "latin1"))
+         (ly:warn "programming error: no such encoding: ~S" coding-name)
+         (ly:warn "programming error: cross thumbs, using: ~S:" fallback)
+         (get-coding fallback))))))
 
 (define-public (get-coding-filename coding-name)
   (car (get-coding coding-name)))
index 859c7b7cc191bf2b87e134a1945fcd8c0d3c010f..65e1719d1431c464eeeda1e5fe51393a08788df4 100644 (file)
@@ -1,13 +1,11 @@
 # -*-python-*-
 
-import os
-
 Import ('env')
 sources = env['src_glob'] (env, '*.py')
-gen_files = map (lambda x: os.path.splitext (x)[0], sources)
 gens = map (env.AT_COPY, sources)
 dir = env['bindir']
-env.Install (dir, gen_files)
+env.Install (dir, gens)
+env.Alias ('install', env['bindir'])
 
-#pot = env.POT (sources)
-#env.Alias ('pot', pot)
+po = env.Command ('lilypond.po', sources, env['pocommand'])
+env.Alias ('po-update', po)
index 5d25e923f5602aa9069559a3fa95f61b7a321a51..00b9fa84971390769054a070c357e99a81d868e9 100644 (file)
@@ -1,4 +1,4 @@
 
-$(EXECUTABLE): $(outdir)/config.h $(O_FILES) $(outdir)/version.hh
+$(EXECUTABLE): $(outdir)/config.hh $(O_FILES) $(outdir)/version.hh
        $(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true
        $(LD) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS)
index 73715910e64c5ea862e0ce83ce024967b05f5475..a152e28e0bc04e5c28e7c80365a1b8c974ac388a 100644 (file)
@@ -103,7 +103,7 @@ local-tags:
 $(outdir)/version.hh: $(depth)/VERSION $(config_make)
        $(PYTHON) $(step-bindir)/make-version.py $< > $@
 
-$(outdir)/config.h: $(config_h)
+$(outdir)/config.hh: $(config_h)
        cp -p $< $@
 
 configure: configure.in aclocal.m4
index 03f93fba2a3e91f7eb4e56d968517cde3659daa5..942c4f01df369ce397b4fa02d302b253bba66a89 100644 (file)
@@ -1,5 +1,5 @@
 
-$(LIBRARY): $(outdir)/config.h $(O_FILES)
+$(LIBRARY): $(outdir)/config.hh $(O_FILES)
        $(AR) $(ARFLAGS) $@ $(O_FILES)
 # thanks to Nelson Beebe for this trick.
        $(RANLIB) $@ || $(AR) ts $@ || true
index 7a1a3e5c4995080c220e9d987d569f11e64c3da3..62b2db26d2c21453af070a1114333cc774438d72 100644 (file)
@@ -1,4 +1,4 @@
 
 
-$(SHARED_LIBRARY): $(outdir)/config.h $(LO_FILES)
+$(SHARED_LIBRARY): $(outdir)/config.hh $(LO_FILES)
        $(LD) $(SHARED_FLAGS) -o $@ $(LO_FILES) $(ALL_LDFLAGS)
index fe29adffbfb6bee9033c3be3b3a1a4358964a024..4633f8be1a323352441171d9c5ec8d3c0fe222a6 100644 (file)
@@ -2,9 +2,8 @@ include $(stepdir)/www-targets.make
 
 local-dist: configure 
 
-# urg!: this gets into every package (ie: yodl)
 local-distclean: 
-       rm -f config.h config.hh config.make Makefile GNUmakefile \
+       rm -f config.hh config.make Makefile GNUmakefile \
                config.cache config.status config.log index.html \
                stepmake/stepmake/stepmake stepmake/stepmake/bin