]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Jul 2004 01:24:45 +0000 (01:24 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Jul 2004 01:24:45 +0000 (01:24 +0000)
Documentation/user/SConscript
SConstruct
buildscripts/SConscript [new file with mode: 0644]
buildscripts/builder.py
elisp/SConscript [new file with mode: 0644]
lily/SConscript
ps/SConscript [new file with mode: 0644]
scripts/SConscript [new file with mode: 0644]
tex/SConscript [new file with mode: 0644]

index d0c237277ec7c6f619f3c0e5b66910f225e60de8..fd2359b523eee606c48493d22b1e08fd0fe3d162 100644 (file)
@@ -1,27 +1,17 @@
 # -*-python-*-
 
-import glob
 import os
-import re
-import sys
+import string
 
 Import ('env')
 sources = env['src_glob'] (env, '*.tely')
 pngs = env['src_glob'] (env, '*.png')
 
-def verbose_opt (env, opt):
-       if env['verbose']:
-               return opt
-       return ''
-
-LILYPOND_BIN = env['LILYPOND_BIN']
-LILYPONDPREFIX = env['LILYPONDPREFIX']
-
 mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
 lilybuild = os.path.join (env['absbuild'], 'lily', env['out'])
 userbuild = os.path.join (env['absbuild'], 'Documentation/user', env['out'])
 
-env.Depends ('lilypond.texi', LILYPOND_BIN)
+env.Depends ('lilypond.texi', env['LILYPOND_BIN'])
 env.Depends ('lilypond.texi', 'lilypond-internals.texi')
 env.Depends ('doc', mfbuild)
 
@@ -29,12 +19,11 @@ png_stems = map (lambda x: os.path.splitext (x)[0], pngs)
 epss = map (env.Png2eps, png_stems)
 env.Depends ('lilypond.texi', epss)
 
-env.Command ('lilypond-internals.texi', LILYPOND_BIN,
-          ('(cd ${TARGET.dir} && \
-          LILYPONDPREFIX=%(LILYPONDPREFIX)s %(LILYPOND_BIN)s ' \
-           + verbose_opt (env, ' --verbose') \
-           + ' ' + os.path.join (env['srcdir'], 'ly/generate-documentation')\
-           + ')') % vars ())
+lydir = Dir ('.').srcnode ().abspath + '/../../ly'
+env.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
+            'cd ${TARGET.dir} \
+            && LILYPONDPREFIX=$LILYPONDPREFIX $LILYPOND_BIN $__verbose \
+            $lydir/generate-documentation')
 
 doc_stems = map (lambda x: os.path.splitext (x)[0], sources)
 texis = map (env.Tely2texi, doc_stems)
@@ -44,44 +33,36 @@ pdfs = map (env.Dvi2pdf, doc_stems)
 
 
 def file_subst (file_name, find, subst):
-       find_re = re.compile (find, re.MULTILINE)
        s = open (file_name).read ()
-       t = re.sub (find_re, subst, s)
+       t = string.replace (find, subst, s)
        if s != t:
                os.rename (file_name, file_name + '~')
                h = open (file_name, "w")
                h.write (t)
                h.close ()
 
-##docdir = os.path.join (env['srcdir'], 'Documentation')
-docdir = Dir ('.').srcnode ().abspath + '/..'
-reldir = 'foe'
-out = env['out']
-srcdir = env['srcdir']
-verbose = verbose_opt (env, ' --verbose')
-a = ('makeinfo -I%(reldir)s -I${SOURCE.dir}'\
-     + ' --output=${TARGET.dir}'\
-     + ' --css-include=%(docdir)s/texinfo.css'\
-     + ' --html%(verbose)s'\
-     + ' $SOURCE &&' \
-     + ' makeinfo -I%(reldir)s -I${SOURCE.dir}' \
-     + ' --output=$TARGET' \
-     + ' --css-include=%(docdir)s/texinfo.css' \
-     + ' --html --no-split --no-headers %(verbose)s' \
-     + ' $SOURCE') % vars ()
+e = env.Copy ()
+e['usersrc'] = Dir ('.').srcnode ().abspath
 def url_fixup (target, source, env):
        file_subst (str (target[0]),
                    '\.\./lilypond-internals', 'lilypond-internals/')
-c = 'pwd; ln -f %(userbuild)s/*.png %(userbuild)s/*.ly ${TARGET.dir}/' % vars ()
-e = env.Copy ()
-e.Command ('lilypond/lilypond.html', 'lilypond.texi', [a, url_fixup, c])
+a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
+--css-include=$usersrc/../texinfo.css $__verbose \
+--output=${TARGET.dir} $SOURCE',
+     '$MAKEINFO -I$usersrc -I${SOURCE.dir} --html --no-split --no-headers \
+     --css-include=$usersrc/../texinfo.css $__verbose \
+     --output=$TARGET $SOURCE',
+     url_fixup,
+     '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)
 
 env.Alias ('doc', texis)
 env.Alias ('doc', dvis)
 env.Alias ('doc', pss)
 env.Alias ('doc', pdfs)
 
-env.Alias ('doc', 'lilypond-internals/lilypond.html')
+env.Alias ('doc', 'lilypond/lilypond.html')
 env.Alias ('doc', 'lilypond-internals/lilypond-internals.html')
index 2b23ff6401829e7c8f06f09075f8ca6561ad69a5..8e92bd5eeaa0c85814c9fe01e4d13e9f93bdf2dc 100644 (file)
@@ -3,6 +3,9 @@
 '''
 Experimental scons (www.scons.org) building:
 
+scons TARGET builds from source directory ./TARGET (not recursive)
+
+
 Usage:
     scons
     scons lily            # build lily
@@ -10,7 +13,7 @@ Usage:
     LILYPONDPREFIX=out-scons/usr/share/lilypond lily/out-scons/lilypond-bin
     scons doc             # build web doc
 
-    scons fonts           # build all font stuff (split this? )
+?    scons fonts           # build all font stuff (split this? )
 
     scons config          # reconfigure
 
@@ -56,8 +59,13 @@ import os
 import sys
 import string
 
+# SConscripts are only needed in directories where something needs
+# to be done, building or installing
+# TODO: Documentation/*, input/*/*, vim, po
+# rename Documentation/* to ./doc?
 subdirs = ['flower', 'lily', 'mf', 'scm', 'ly', 'Documentation',
-          'Documentation/user', 'input']
+          'Documentation/user', 'input', 'scripts', 'elisp',
+          'buildscripts', 'cygwin', 'debian']
 
 usage = r'''Usage:
 scons [KEY=VALUE].. [TARGET]..
@@ -131,7 +139,6 @@ env['sharedir_package_version'] = os.path.join (env['sharedir_package'],
                                                 env['version'])
 env['lilypondprefix'] = os.path.join (env['sharedir_package_version'])
 
-
 if env['debugging']:
        env.Append (CFLAGS = '-g')
        env.Append (CXXFLAGS = '-g')
@@ -146,21 +153,18 @@ if env['warnings']:
        env.Append (CXXFLAGS = '-W')
        env.Append (CXXFLAGS = '-Wall')
        env.Append (CXXFLAGS = '-Wconversion')
+if env['verbose']:
+       env['__verbose'] = '--verbose'
 
+build = env['build']
+out = env['out']
 
-
-##Import ('env')
-here = os.getcwd ()
-reldir = str (Dir ('.').srcnode ())
-os.chdir (reldir)
-srcdir = os.getcwd ()
-os.chdir (here)
-##outdir = os.path.join (env['build'], reldir, env['out'])
-outdir = os.path.join (env['build'], env['out'])
+outdir = Dir ('.').path
+abs_srcdir = Dir ('.').srcnode ().abspath
+srcdir = abs_srcdir
+abs_outdir = Dir ('.').abspath
 
 env['srcdir'] = srcdir
-build = env['build']
-out = env['out']
 
 
 def list_sort (lst):
@@ -341,9 +345,6 @@ def configure (env):
 if 1 or not os.path.exists (config_h) or 'config' in COMMAND_LINE_TARGETS:
        env = configure (env)
 
-env.Append (LIBPATH = ['#/flower/' + out,], CPPPATH = [outdir, '#',])
-
-Export ('env')
 
 #ugr
 if build == '.':
@@ -352,11 +353,15 @@ else:
        absbuild = build
 env['absbuild'] = absbuild
 
-# duh
+env.Append (LIBPATH = [os.path.join (absbuild, 'flower', out),],
+           CPPPATH = [outdir, '#',])
+
+Export ('env')
+
 env['MAKEINFO'] = 'LANG= makeinfo'
 env['PYTHON'] = 'python'
 env['LILYPOND_BIN'] = os.path.join (absbuild, 'lily', out, 'lilypond-bin')
-env['LILYPONDPREFIX'] =        os.path.join (outdir, 'usr/share/lilypond')
+env['LILYPONDPREFIX'] =        os.path.join (absbuild, out, 'usr/share/lilypond')
 env['LILYPOND_BOOK'] = srcdir + '/scripts/lilypond-book.py'
 env['ABC2LY_PY'] = srcdir + '/scripts/abc2ly.py'
 env['MF_TO_TABLE_PY'] = srcdir + '/buildscripts/mf-to-table.py'
@@ -381,13 +386,13 @@ env['TEXINFO_PAPERSIZE_OPTION'] = '-t @afourpaper'
 SConscript ('buildscripts/builder.py')
 
 for d in subdirs:
-       b = os.path.join (build, d, out)
-       # Support clean sourcetree build (--srcdir build)
-       # and ./out build.
-       if (build and build != '.') \
-          or (out and out != '.'):
-               env.BuildDir (b, d, duplicate=0)
-       SConscript (os.path.join (b, 'SConscript'))
+       if os.path.exists (os.path.join (d, 'SConscript')):
+               b = os.path.join (build, d, out)
+               # Support clean sourcetree build (--srcdir build)
+               # and ./out build.
+               if (build and build != '.') or (out and out != '.'):
+                       env.BuildDir (b, d, duplicate=0)
+                       SConscript (os.path.join (b, 'SConscript'))
 
 # as a builder?
 def symlink_tree (prefix):
diff --git a/buildscripts/SConscript b/buildscripts/SConscript
new file mode 100644 (file)
index 0000000..d669408
--- /dev/null
@@ -0,0 +1,5 @@
+# -*-python-*-
+
+Import ('env')
+sources = ['lilypond-profile.sh', 'lilypond-login.sh']
+gens = map (env.AT, sources)
index 2997b7f2f75a4ddade148f95006190afc6b56acb..7c82820f8ce9cfb85ccf2f5d913827c3a0c44747 100644 (file)
@@ -2,18 +2,13 @@
 
 import glob
 import os
-import re
 import string
 
 Import ('env')
 
-def verbose_opt (env, opt):
-       if env['verbose']:
-               return opt
-       return ''
-
+# junkme
 srcdir = env['srcdir']
-build = env['build']
+
 def join_path (path, infix=os.pathsep, prefix = ''):
        def dir (x):
                if x and x[0] == '#':
@@ -21,25 +16,14 @@ def join_path (path, infix=os.pathsep, prefix = ''):
                return x
        return string.join (map (lambda x: prefix + dir (x), path), infix)
 
-verbose = verbose_opt (env, ' --verbose')
-MAKEINFO_INCLUDES = join_path (env['MAKEINFO_PATH'], '', ' -I')
-MAKEINFO = env['MAKEINFO']
-a = ('%(MAKEINFO)s%(verbose)s %(MAKEINFO_INCLUDES)s'\
-     ' --no-split --no-headers --output=$TARGET $SOURCE') % vars ()
+env['MAKEINFO_INCLUDES'] = join_path (env['MAKEINFO_PATH'], '', ' -I')
+a = '$MAKEINFO $__verbose $MAKEINFO_INCLUDES --no-split --no-headers \
+--output=$TARGET $SOURCE'
 texi2txt = Builder (action = a, suffix = '.txt', src_suffix = '.texi')
 env.Append (BUILDERS = {'Texi2txt': texi2txt})
 
-
-PYTHON = env['PYTHON']
-ABC2LY_PY = env['ABC2LY_PY']
-LILYPOND_PY = env['LILYPOND_PY']
-LILYPOND_BIN = env['LILYPOND_BIN']
-LILYPOND_BOOK = env['LILYPOND_BOOK']
-LILYPOND_BOOK_FLAGS = env['LILYPOND_BOOK_FLAGS']
-LILYPOND_BOOK_FORMAT = env['LILYPOND_BOOK_FORMAT']
-LILYPOND_BOOK_INCLUDES = join_path (env['LILYPOND_BOOK_PATH'], '',
-                                   ' --include=')
-LILYPONDPREFIX = env['LILYPONDPREFIX']
+env['LILYPOND_BOOK_INCLUDES'] = join_path (env['LILYPOND_BOOK_PATH'], '',
+                                          ' --include=')
 
 # UGHR, lilypond.py uses lilypond-bin from PATH
 #env.Append (ENV = {'PATH' : os.environ['PATH']})
@@ -48,7 +32,7 @@ env.PrependENVPath ('PATH',
 
 if os.environ.has_key ('TEXMF'):
        env.Append (ENV = {'TEXMF' : os.environ['TEXMF']})
-env.Append (ENV = {'TEXMF' : '{' + LILYPONDPREFIX + ',' \
+env.Append (ENV = {'TEXMF' : '{' + env['LILYPONDPREFIX'] + ',' \
                   + os.popen ('kpsexpand \$TEXMF').read ()[:-1] + '}' })
 
 if os.environ.has_key ('LD_LIBRARY_PATH'):
@@ -63,33 +47,27 @@ env.Append (PYTHONPATH = [os.path.join (env['absbuild'], env['out'],
 env.Append (ENV = { 'PYTHONPATH' : string.join (env['PYTHONPATH'],
                                                os.pathsep) } )
 
-verbose = verbose_opt (env, ' --verbose')
-a = (r'''rm -f $$(grep -LF '\lilypondend' ${TARGET.dir}/lily-*.tex 2>/dev/null); ''' \
-     + 'LILYPONDPREFIX=%(LILYPONDPREFIX)s '\
-     + '%(PYTHON)s %(LILYPOND_BOOK)s%(verbose)s'\
-     + ' --include=${TARGET.dir} %(LILYPOND_BOOK_INCLUDES)s'\
-     + r""" --process='%(LILYPOND_BIN)s %(LILYPOND_BOOK_INCLUDES)s'"""\
-     + ' --output=${TARGET.dir} --format=%(LILYPOND_BOOK_FORMAT)s\
-     %(LILYPOND_BOOK_FLAGS)s\
-     $SOURCE') % vars ()
+a = ['rm -f $$(grep -LF "\lilypondend" ${TARGET.dir}/lily-*.tex 2>/dev/null);',
+     'LILYPONDPREFIX=$LILYPONDPREFIX \
+     $PYTHON $LILYPOND_BOOK $__verbose \
+     --include=${TARGET.dir} $LILYPOND_BOOK_INCLUDES \
+     --process="$LILYPOND_BIN $LILYPOND_BOOK_INCLUDES" \
+     --output=${TARGET.dir} --format=$LILYPOND_BOOK_FORMAT \
+     $LILYPOND_BOOK_FLAGS \
+     $SOURCE']
 tely2texi = Builder (action = a, suffix = '.texi', src_suffix = '.tely')
 env.Append (BUILDERS = {'Tely2texi': tely2texi})
 
-TEXINFO_PAPERSIZE_OPTION = env['TEXINFO_PAPERSIZE_OPTION']
-a = '(cd ${TARGET.dir} &&\
- texi2dvi --batch %(TEXINFO_PAPERSIZE_OPTION)s ${SOURCE.file})' % vars ()
+a = 'cd ${TARGET.dir} \
+&& texi2dvi --batch $TEXINFO_PAPERSIZE_OPTION ${SOURCE.file}'
 texi2dvi = Builder (action = a, suffix = '.dvi', src_suffix = '.texi')
 env.Append (BUILDERS = {'Texi2dvi': texi2dvi})
 
 env.Append (DVIPSFLAGS = '-Ppdf -u+lilypond.map -u+ec-mftrace.map')
 
-DVIPS_PAPERSIZE = 'a4'
-DVIPSFLAGS = env['DVIPSFLAGS']
-a = ('set -x; dvips %(DVIPSFLAGS)s' \
-     + ' -o ${TARGET}.pdfps'\
-     + ' -t %(DVIPS_PAPERSIZE)s $SOURCE &&'\
-     + ' ps2pdf -sPAPERSIZE=%(DVIPS_PAPERSIZE)s ${TARGET}.pdfps $TARGET') \
-     % vars ()
+env ['DVIPS_PAPERSIZE'] = 'a4'
+a = ['dvips $DVIPSFLAGS -o ${TARGET}.pdfps -t $DVIPS_PAPERSIZE $SOURCE',
+     'ps2pdf -sPAPERSIZE=$DVIPS_PAPERSIZE ${TARGET}.pdfps $TARGET']
 dvi2pdf = Builder (action = a, suffix = '.pdf', src_suffix = '.dvi')
 env.Append (BUILDERS = {'Dvi2pdf': dvi2pdf})
 
@@ -101,29 +79,21 @@ def add_ps_target (target, source, env):
        base = os.path.splitext (str (target[0]))[0]
        return (target + [base + '.ps'], source)
 
-#a = ('echo "PATH=$$PATH"; echo "TEXMF=$$TEXMF"; which lilypond-bin;'\
-a = (' LILYPONDPREFIX=%(LILYPONDPREFIX)s '\
-     + '%(PYTHON)s %(LILYPOND_PY)s%(verbose)s'\
-     + ' --include=${TARGET.dir}'\
-     + ' --output=${TARGET.base}'\
-     + ' $SOURCE') % vars ()
+a = ' 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 = ('LILYPONDPREFIX=%(LILYPONDPREFIX)s '\
-     + '%(PYTHON)s %(ABC2LY_PY)s%(verbose)s'\
-#     + ' --include=${TARGET.dir}'\
-     + ' --strict'\
-     + ' --output=${TARGET.base}'\
-     + ' $SOURCE') % vars ()
+a = 'LILYPONDPREFIX=$LILYPONDPREFIX $PYTHON $ABC2LY_PY \
+--strict --output=${TARGET.base} $SOURCE'
 abc2ly = Builder (action = a, suffix = '.ly', src_suffix = '.abc')
 env.Append (BUILDERS = {'Abc2ly': abc2ly})
 
-
-MFMODE = env['MFMODE']
 def add_log_target (target, source, env):
        base = os.path.splitext (str (target[0]))[0]
        return (target + [base + '.log'], source)
@@ -138,27 +108,22 @@ def add_suffixes (target, source, env, target_suffixes, src_suffixes):
        return (target + map (lambda x: base + x, target_suffixes),
                source + map (lambda x: base + x, src_suffixes))
 
-scrdir = env['srcdir']
-a = ('(cd ${TARGET.dir} &&'\
-     + ' MFINPUTS=.:${SOURCE.dir}:%(srcdir)s/${SOURCE.dir}'\
-     + ' mf "\\mode:=%(MFMODE)s; nonstopmode;'\
-     + ' input ${SOURCE.filebase};" ' \
-     + ' | grep -v "@\|>>")') % vars ()
+a = 'cd ${TARGET.dir} && \
+MFINPUTS=.:${SOURCE.dir}:$srcdir/${SOURCE.dir} \
+mf "\\mode:=$MFMODE; nonstopmode; input ${SOURCE.filebase};" \
+| grep -v "@\|>>"'
 tfm = Builder (action = a, suffix = '.tfm', src_suffix = '.mf',
 #             emitter = lambda t, s, e: add_suffixes (t, s, e, ['.log'], []))
               emitter = add_log_target)
 env.Append (BUILDERS = {'TFM': tfm})
 
-MF_TO_TABLE_PY = env['MF_TO_TABLE_PY']
-#verbose = verbose_opt (env, ' --verbose')
-verbose = ''
-a = ('%(PYTHON)s %(MF_TO_TABLE_PY)s%(verbose)s'\
-     + ' --outdir=${TARGET.dir}'\
-     + ' --afm=${TARGET.base}.afm' \
-     + ' --enc=${TARGET.base}.enc' \
-     + ' --tex=${TARGET.base}.tex' \
-     + ' --ly=${TARGET.base}list.ly'\
-     + ' ${TARGET.base}.log') % vars ()
+a = '$PYTHON $MF_TO_TABLE_PY \
+--outdir=${TARGET.dir} \
+--afm=${TARGET.base}.afm \
+--enc=${TARGET.base}.enc \
+--tex=${TARGET.base}.tex \
+--ly=${TARGET.base}list.ly \
+${TARGET.base}.log'
 afm = Builder (action = a, suffix = '.afm', src_suffix = '.log',
               emitter = add_enc_ly_tex_target)
 env.Append (BUILDERS = {'AFM': afm})
@@ -168,15 +133,12 @@ def add_enc_src (target, source, env):
        return (target, source + [base + '.enc'])
 
 # UGH, should fix --output option for mftrace
-verbose = verbose_opt (env, ' --verbose')
-a = ('(cd ${TARGET.dir} && '
-     + ' if test -e ${SOURCE.filebase}.enc; then encoding="--encoding=${SOURCE.filebase}.enc"; fi;' \
-#     + ' MFINPUTS=.:${TARGET.dir}:${SOURCE.dir}'\
-# ugrh
-     + ' MFINPUTS=%(srcdir)s/mf}:.:'\
-     + ' mftrace --pfa --simplify --keep-trying $$encoding%(verbose)s'\
-     + ' --include=${TARGET.dir}'\
-     + ' ${SOURCE.file})') % vars ()
+a = 'cd ${TARGET.dir} && \
+if test -e ${SOURCE.filebase}.enc; then encoding="--encoding=${SOURCE.filebase}.enc"; fi; \
+MFINPUTS=$srcdir/mf:.: \
+mftrace --pfa --simplify --keep-trying $$encoding $__verbose \
+--include=${TARGET.dir} \
+${SOURCE.file}'
 
 pfa = Builder (action = a,
               suffix = '.pfa',
@@ -184,13 +146,8 @@ pfa = Builder (action = a,
               emitter = add_enc_src)
 env.Append (BUILDERS = {'PFA': pfa})
 
-# FIXME
-#verbose = verbose_opt (env, ' --verbose')
-verbose = ''
-DIFF_PY = os.path.join (srcdir, 'stepmake/bin/package-diff.py')
-verbose = ''
-a = ('%(PYTHON)s %(DIFF_PY)s%(verbose)s'\
-     + ' --outdir=${TARGET.dir}') % vars ()
+env['DIFF_PY'] = os.path.join (srcdir, 'stepmake/bin/package-diff.py')
+a = '$PYTHON $DIFF_PY $__verbose --outdir=${TARGET.dir}'
 patch = Builder (action = a, suffix = '.diff', src_suffix = '.tar.gz')
 env.Append (BUILDERS = {'PATCH': patch})
 
@@ -201,3 +158,50 @@ def src_glob (env, s):
        os.chdir (here)
        return result
 env['src_glob'] = src_glob
+
+atvars = [
+'BASH',
+'DATE',
+'sharedstatedir',
+'GUILE',
+'bindir',
+'date',
+'datadir',
+'lilypond_datadir',
+'lilypond_libdir',
+'local_lilypond_datadir',
+'local_lilypond_libdir',
+'localedir',
+'PACKAGE',
+'package',
+'PATHSEP',
+'PERL',
+'prefix',
+'program_prefix',
+'program_suffix',
+'PYTHON',
+'SHELL',
+'TOPLEVEL_VERSION',
+'step-bindir',
+]
+
+#compat
+env['lilypond_datadir'] = env['sharedir_package']
+env['local_lilypond_datadir'] = env['sharedir_package_version']
+env['TOPLEVEL_VERSION'] = env['version']
+env['SHELL'] = '/bin/sh'
+env['BASH'] = '/bin/bash'
+
+def at (target, source, env):
+    s = open (str (source[0])).read ()
+    for i in atvars:
+           if env.has_key (i):
+                   s = string.replace (s, '@%s@'% i, env[i])
+    t = str (target[0])
+    open (t, 'w').write (s)
+    # ugh
+    os.chmod (t, 0755)
+
+at = Builder (action = at)
+env.Append (BUILDERS = {'AT': at})
+
diff --git a/elisp/SConscript b/elisp/SConscript
new file mode 100644 (file)
index 0000000..4587ff1
--- /dev/null
@@ -0,0 +1,15 @@
+# -*-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)
+
+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)
+
+dir = env['sharedir_package_version'] + '/elisp'
+env.Install (dir, sources)
index d9597c65bccf1c313d310098b51216d744b8fab6..3043a3e9cdc541de39645683ad91dd27a58a555b 100644 (file)
@@ -11,6 +11,7 @@ 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')
+map (e.Precious, ['parser.cc', 'lexer.cc', 'parser.hh'])
 
 e.Append (LIBS = ['flower'])
 e.ParseConfig ('guile-config link')
diff --git a/ps/SConscript b/ps/SConscript
new file mode 100644 (file)
index 0000000..6a5308a
--- /dev/null
@@ -0,0 +1,9 @@
+# -*-python-*-
+
+Import ('env')
+texdir = env['sharedir_package_version'] + '/tex'
+psdir = env['sharedir_package_version'] + '/ps'
+env.Install (psdir, ['lilyponddefs',])
+env.Install (texdir, ['music-drawing-routines',])
+#env.Alias ('install', texdir)
+env.Alias ('install', psdir)
diff --git a/scripts/SConscript b/scripts/SConscript
new file mode 100644 (file)
index 0000000..5b71997
--- /dev/null
@@ -0,0 +1,13 @@
+# -*-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, sources)
+dir = env['bindir']
+env.Install (dir, gen_files)
+#env.Install (dir, sources)
+#env.Install (dir, gens)
+#env.Alias ('install', dir)
diff --git a/tex/SConscript b/tex/SConscript
new file mode 100644 (file)
index 0000000..3b54745
--- /dev/null
@@ -0,0 +1,7 @@
+# -*-python-*-
+
+Import ('env')
+sources = env['src_glob'] (env, '*.tex') + ['latin1.enc']
+dir = env['sharedir_package_version'] + '/tex'
+env.Install (dir, sources)
+env.Alias ('install', dir)