]> git.donarmstrong.com Git - lilypond.git/commitdiff
Updates. Add targets: tar, dist, release.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 12 Jul 2004 19:35:49 +0000 (19:35 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 12 Jul 2004 19:35:49 +0000 (19:35 +0000)
ChangeLog
Documentation/SConscript
Documentation/user/SConscript
SConstruct
buildscripts/builder.py
flower/SConscript
input/SConscript
lily/SConscript
ly/SConscript
mf/SConscript
scm/SConscript

index c3d55e2216f0566d8dac1c20c54948d56b36589d..c403bcb875db0699c7b77ce5cdea670656e36de4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2004-07-12  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-       * SConstruct: Updates.
+       * SConstruct: Updates.  Add targets: tar, dist, release.
 
 2004-07-11  Jan Nieuwenhuizen  <janneke@gnu.org>
 
index 1fe44ad51ce7649b57cc54bb7112665582165726..56b9039c03128c4ecdaa2ef742b3ea7192f6cc4e 100644 (file)
@@ -11,15 +11,3 @@ sources = ['index.html.in', 'texinfo.css']
 os.chdir (here)
 outdir = os.path.join (env['build'], reldir, env['out'])
 
-all_sources = ['SConscript',] + sources
-
-# ballprefix = env['ballprefix'] + '/Documentation'
-# ball = Builder (prefix = ballprefix + '/', action = 'ln $SOURCE $TARGET')
-# et = env.Copy (BUILDERS = {'BALL': ball})
-# ballize = map (et.BALL, all_sources)
-# tar = env.Tar (env['tarball'],
-#             map (lambda x: os.path.join (ballprefix, x), all_sources))
-
-tar = env['baller'] ('Documentation', all_sources, env)
-#env.Alias ('tar', tar)
-
index 4b444a508d6370f90a485927d1806a7c0cbd0e53..2798c17df69b5c0b8a56ad59e2b9542bc005e464 100644 (file)
@@ -99,12 +99,3 @@ env.Alias ('doc', pdfs)
 
 env.Alias ('doc', 'lilypond-internals/lilypond.html')
 env.Alias ('doc', 'lilypond-internals/lilypond-internals.html')
-
-all_sources = ['SConscript',] + sources + pngs
-
-ballprefix = env['ballprefix'] + '/Documentation/user'
-ball = Builder (prefix = ballprefix + '/', action = 'ln $SOURCE $TARGET')
-et = env.Copy (BUILDERS = {'BALL': ball})
-ballize = map (et.BALL, all_sources)
-tar = env.Tar (env['tarball'],
-              map (lambda x: os.path.join (ballprefix, x), all_sources))
index c2ffacbab43144fb27e4aff2cfea1400def7e0ed..95c2253ccd06a98ef3eaf17702c43bd45ad3dcb3 100644 (file)
@@ -37,8 +37,8 @@ prefix=os.path.join (os.environ['HOME'], 'usr', 'pkg', 'lilypond')
 
 
 # TODO:
-#   * TARBALL
 #   * add missing dirs
+#   * cleanup
 
 #   * separate environments?
 #     - compile environment checks headers and libraries
@@ -78,8 +78,7 @@ env.Alias ('all', ['lily', 'mf', 'input', 'Documentation'])
 ## FIXME: opts in function
 
 # Put your favourite stuff in custom.py
-opts = Options ('custom.py', ARGUMENTS)
-#opts = Options (['config.cache', 'custom.py'], ARGUMENTS)
+opts = Options (['config.cache', 'custom.py'], ARGUMENTS)
 opts.Add ('prefix', 'Install prefix', '/usr/')
 opts.Add ('out', 'Output directory', 'out-scons')
 opts.Add ('build', 'Build directory', '.')
@@ -105,7 +104,7 @@ Help (usage + opts.GenerateHelpText (env))
 env = Environment (options = opts)
 
 opts.Update (env)
-#opts.Save ('config.cache', env)
+opts.Save ('config.cache', env)
 
 env.CacheDir (os.path.join (env['build'], '=build-cache'))
 
@@ -332,6 +331,7 @@ def configure (env):
 
 # Hmm.  Must configure when building lily, to get compiler and linker
 # flags set-up.
+# FIXME
 if not os.path.exists (config_h) or 'config' in COMMAND_LINE_TARGETS\
    or 'lily' in BUILD_TARGETS or 'all' in BUILD_TARGETS:
        env = configure (env)
@@ -378,41 +378,8 @@ env['MAKEINFO_PATH'] = ['.', '#/Documentation/user',
 ## TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
 env['TEXINFO_PAPERSIZE_OPTION'] = '-t @afourpaper'
 
-tarbase = package.name + '-' + env['version']
-tarname = tarbase + '.tar.gz'
-
-if 0: # broken :-(
-       ballprefix = os.path.join (outdir, tarbase)
-       tarball = os.path.join (outdir, tarname)
-else:
-       ballprefix = os.path.join (os.getcwd (), tarbase)
-       tarball = os.path.join (os.getcwd (), tarname)
-env['tarball'] = tarball
-env['ballprefix'] = ballprefix
-
 SConscript ('buildscripts/builder.py')
 
-readme_files = ['ChangeLog', 'COPYING', 'DEDICATION', 'ROADMAP', 'THANKS']
-readme_txt = ['AUTHORS.txt', 'README.txt', 'INSTALL.txt', 'NEWS.txt']
-# to be [re]moved after spit
-patch_files = ['emacsclient.patch', 'server.el.patch', 'darwin.patch']
-
-#testing
-env.Append (TARFLAGS = '-z --owner=0 --group=0')
-env.Append (GZIPFLAGS = '-9')
-#all_sources = ['SConstruct', 'VERSION', '.cvsignore']\
-#            + readme_files #+ patch_files # + readme_txt
-all_sources = ['SConstruct', 'VERSION']\
-             + readme_files
-#            + readme_files + readme_txt
-#            + readme_files + patch_files + readme_txt
-
-env['sources'] = all_sources
-
-map (lambda x: env.Texi2txt (x, os.path.join ('Documentation/topdocs',
-                                             os.path.splitext (x)[0])),
-     readme_txt)
-
 for d in subdirs:
        b = os.path.join (build, d, out)
        # Support clean sourctree build (srcdir build)
@@ -436,7 +403,6 @@ def symlink_tree (prefix):
                                os.mkdir (dir)
                        os.chdir (dir)
                map (mkdir, string.split (dir, os.sep))
-       #srcdir = os.getcwd ()
        def symlink (src, dst):
                os.chdir (absbuild)
                dir = os.path.dirname (dst)
@@ -468,21 +434,44 @@ if env['debugging']:
        if not os.path.exists (prefix):
                symlink_tree (prefix)
 
-#ball = Builder (prefix = ballprefix + '/', action = 'ln $SOURCE $TARGET')
-#et = env.Copy (BUILDERS = {'BALL': ball})
-#ballize = map (et.BALL, all_sources)
-#tar = env.Tar (tarball, map (lambda x: os.path.join (env['ballprefix'], x),
-#                           all_sources))
-tar = env['baller'] ('', all_sources, env)
+#### dist, tar
+src_files = ['ChangeLog', '.cvsignore', 'Documentation/index.html.in',
+            'lily/beam.cc']
+
+def cvs_files (dir):
+       entries = open (os.path.join (dir, 'CVS/Entries')).readlines ()
+       files = filter (lambda x: x[0] != 'D', entries)
+       return map (lambda x: os.path.join (dir, x[1:x[1:].index ('/')+1]),
+                   files)
+
+readme_files = ['AUTHORS', 'README', 'INSTALL', 'NEWS']
+foo = map (lambda x: env.Texi2txt (x + '.txt',
+                                  os.path.join ('Documentation/topdocs',
+                                                x)),
+          readme_files)
+txt_files = map (lambda x: x + '.txt', readme_files)
+src_files = reduce (lambda x, y: x + y, map (cvs_files, subdirs))
+tar_base = package.name + '-' + env['version']
+tar_name = tar_base + '.tar.gz'
+ball_prefix = os.path.join (outdir, tar_base)
+tar_ball = os.path.join (outdir, tar_name)
+
+dist_files = src_files + txt_files
+ball_files = map (lambda x: os.path.join (ball_prefix, x), dist_files)
+map (lambda x: env.Depends (tar_ball, x), ball_files)
+map (lambda x: env.Command (os.path.join (ball_prefix, x), x,
+                           'ln $SOURCE $TARGET'), dist_files)
+tar = env.Command (tar_ball, src_files,
+                  'tar czf $TARGET -C $TARGET.dir %s' % tar_base)
 env.Alias ('tar', tar)
 
-distball = os.path.join (package.release_dir, tarname)
-env.Command (distball, tarball,
+dist_ball = os.path.join (package.release_dir, tar_name)
+env.Command (dist_ball, tar_ball,
             'if [ -e $SOURCE -a -e $TARGET ]; then rm $TARGET; fi;' \
             + 'ln $SOURCE $TARGET')
-env.Depends ('dist', distball)
-patchfile = os.path.join (outdir, tarbase + '.diff.gz')
-patch = env.PATCH (patchfile, tarball)
-env.Depends (patchfile, distball)
+env.Depends ('dist', dist_ball)
+patch_name = os.path.join (outdir, tar_base + '.diff.gz')
+patch = env.PATCH (patch_name, tar_ball)
+env.Depends (patch_name, dist_ball)
 env.Alias ('release', patch)
 
index cee43ad3962f57934475116b8d33824929775a1b..889c347e02c667b7ce98230afd5c76cafa5ab899 100644 (file)
@@ -200,23 +200,3 @@ a = ('%(PYTHON)s %(DIFF_PY)s%(verbose)s'\
 patch = Builder (action = a, suffix = '.diff', src_suffix = '.tar.gz')
 env.Append (BUILDERS = {'PATCH': patch})
 
-# ughr
-def ln (target, source, env):
-       base = os.path.splitext (source[0].name)[0]
-       suf = os.path.splitext (str (source[0]))[1]
-       if suf:
-               target = [target[0].path + suf,]
-       source = [re.sub ('/' + env['out'] + '/', '/', base + suf)]
-       return (target, source)
-
-def baller (dir_name, sources, env):
-       ballprefix = os.path.join (env['ballprefix'], dir_name)
-       ball = Builder (prefix = ballprefix + '/',
-                       action = 'ln $SOURCE $TARGET',
-                       emitter = ln)
-       et = env.Copy (BUILDERS = {'BALL': ball})
-       ballize = map (et.BALL, sources)
-       return env.Tar (env['tarball'],
-                       map (lambda x: os.path.join (ballprefix, x), sources))
-
-env['baller'] = baller
index 56dd850762d9ca16afc9d625117128edba46eca2..ee172728062327b68d9a907735de2fabec75abd0 100644 (file)
@@ -8,7 +8,6 @@ here = os.getcwd ()
 reldir = str (Dir ('.').srcnode ())
 os.chdir (reldir)
 sources = glob.glob ('*.cc')
-includes = glob.glob ('include/*.hh')
 os.chdir (here)
 outdir = os.path.join (env['build'], reldir, env['out'])
 
@@ -19,13 +18,3 @@ if env['static']:
        e.Library (name, sources) 
 if not env['static'] or env['shared']:
        e.SharedLibrary (name, sources)
-
-all_sources = ['SConscript',] + sources + includes
-all_sources = ['SConscript', 'GNUmakefile']
-ballprefix = env['ballprefix'] + '/flower'
-ball = Builder (prefix = ballprefix + '/', action = 'ln $SOURCE $TARGET')
-et = env.Copy (BUILDERS = {'BALL': ball})
-#et = env.Copy ()
-ballize = map (et.BALL, all_sources)
-tar = env.Tar (env['tarball'],
-              map (lambda x: os.path.join (ballprefix, x), all_sources))
index dbfffa230f923e08284d9f7e9d2a83da956d127b..1e3c40092f06afcede83370f3a378271725472ce 100644 (file)
@@ -24,7 +24,3 @@ mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
 #e.Depends ('doc', 'fonts')
 env.Depends ('doc', mfbuild)
 env.Depends ('doc', LILYPOND_BIN)
-
-#testing
-all_sources = ['SConscript',] + sources + abc_sources
-x = env.Tar (env['tarball'], all_sources)
index 5e29d15bc032dd7842c2f2e67b348a644b737ef7..69769b51dda68496f95a293c1b2a338c30248e40 100644 (file)
@@ -41,14 +41,3 @@ env.Install (env['bindir'], lily)
 env.Alias ('install', env['bindir'])
 
 env.Alias ('lily', lily)
-
-all_sources = ['SConscript',] + sources + includes
-# ballprefix = env['ballprefix'] + '/lily'
-# ball = Builder (prefix = ballprefix + '/', action = 'ln $SOURCE $TARGET')
-# et = env.Copy (BUILDERS = {'BALL': ball})
-# ballize = map (et.BALL, all_sources)
-# tar = env.Tar (env['tarball'],
-#             map (lambda x: os.path.join (ballprefix, x), all_sources))
-
-tar = env['baller'] ('lily', all_sources, env)
-#env.Alias ('tar', tar)
index 871ab3207b647635e17404e50b8d6c32c7984efa..c5f1d69bd2788b9b25d38b589a21a654d63f3485 100644 (file)
@@ -14,7 +14,3 @@ outdir = os.path.join (env['build'], reldir, env['out'])
 lydir = os.path.join (env['sharedir_package_version'], 'ly')
 env.Install (lydir, sources)
 env.Alias ('install', lydir)
-
-#testing
-all_sources = ['SConscript',] + sources
-x = env.Tar (env['tarball'], all_sources)
index f3deeb151ff0d45e8b924aeb7681af9227db2e53..8f7b6017b2c249002b3818498a5943a64daf9a13 100644 (file)
@@ -47,7 +47,3 @@ 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')
-
-#testing
-all_sources = ['SConscript',] + sources
-x = env.Tar (env['tarball'], all_sources)
index 3cb4dd0a09814980a07e4907b6237c3117932b77..adbeac354f722734c24420c0d4e7c2b730b17381 100644 (file)
@@ -14,7 +14,3 @@ outdir = os.path.join (env['build'], reldir, env['out'])
 scmdir = os.path.join (env['sharedir_package_version'], 'scm')
 env.Install (scmdir, sources)
 env.Alias ('install', scmdir)
-
-#testing
-all_sources = ['SConscript',] + sources
-x = env.Tar (env['tarball'], all_sources)