From 4cd95b2351e5aa29e61c75bd68ee700b1e744fb3 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 12 Jul 2004 01:35:27 +0000 Subject: [PATCH] *** empty log message *** --- Documentation/user/SConscript | 8 +++-- SConstruct | 58 +++++++++++++++++++---------------- buildscripts/builder.py | 6 ++-- flower/SConscript | 11 +++++-- lily/SConscript | 9 ++++-- 5 files changed, 54 insertions(+), 38 deletions(-) diff --git a/Documentation/user/SConscript b/Documentation/user/SConscript index a3b04b2194..29c6fa9d5f 100644 --- a/Documentation/user/SConscript +++ b/Documentation/user/SConscript @@ -100,6 +100,10 @@ env.Alias ('doc', pdfs) env.Alias ('doc', 'lilypond-internals/lilypond.html') env.Alias ('doc', 'lilypond-internals/lilypond-internals.html') -#testing all_sources = ['SConscript',] + sources + pngs -x = env.Tar (env['tarball'], all_sources) +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)) diff --git a/SConstruct b/SConstruct index b26a428d8a..641d5ec648 100644 --- a/SConstruct +++ b/SConstruct @@ -59,6 +59,7 @@ import string subdirs = ['flower', 'lily', 'mf', 'scm', 'ly', 'Documentation', 'Documentation/user', 'input'] +#subdirs = [] usage = r'''Usage: scons [KEY=VALUE].. [TARGET].. @@ -374,7 +375,10 @@ tarname = tarbase + '.tar.gz' tarball = os.path.join (outdir, tarname) env['tarball'] = tarball -ballprefix = os.path.join (outdir, tarbase) + '/' +if 0: # broken :-( + ballprefix = os.path.join (outdir, tarbase) +else: + ballprefix = os.path.join (os.getcwd (), tarbase) env['ballprefix'] = ballprefix SConscript ('buildscripts/builder.py') @@ -387,32 +391,19 @@ 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 + readme_txt + patch_files +#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) -#print `all_sources` -#print `map (lambda x: env['ballprefix'] + x, all_sources)` -#ballize = map (env.BALL, all_sources) -#ballize = map (env.BALL, ['SConstruct', 'VERSION']) -#tar = env.Tar (tarball, map (lambda x: env['ballprefix'] + x, all_sources)) -tar = env.Tar (env['tarball'], all_sources) -env.Alias ('tar', tar) - -distball = os.path.join (package.release_dir, tarname) -env.Command (distball, tarball, - '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.Alias ('release', patch) - - for d in subdirs: b = os.path.join (build, d, out) # Support clean sourctree build (srcdir build) @@ -444,13 +435,8 @@ def symlink_tree (prefix): if src[0] == '#': frm = os.path.join (srcdir, src[1:]) else: - print 'dst: ' + dst depth = len (string.split (dir, '/')) - print 'depth: ' + `depth` frm = os.path.join ('../' * depth, src, out) - print 'cwd: ' + `os.getcwd ()` - print 'frm: ' + frm - print 'dst: ' + dst os.symlink (frm, os.path.basename (dst)) map (lambda x: symlink (x[0], os.path.join (prefix, x[1])), (('python', 'lib/lilypond/python'), @@ -473,3 +459,21 @@ 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)) +env.Alias ('tar', env['tarball']) + +distball = os.path.join (package.release_dir, tarname) +env.Command (distball, tarball, + '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.Alias ('release', patch) + + diff --git a/buildscripts/builder.py b/buildscripts/builder.py index 2629e84075..0511f4f3a5 100644 --- a/buildscripts/builder.py +++ b/buildscripts/builder.py @@ -199,6 +199,6 @@ a = ('%(PYTHON)s %(DIFF_PY)s%(verbose)s'\ patch = Builder (action = a, suffix = '.diff', src_suffix = '.tar.gz') env.Append (BUILDERS = {'PATCH': patch}) -# Ugh, how to make a sane tarball with scons? -ball = Builder (prefix = env['ballprefix'], action = 'ln $SOURCE $TARGET') -env.Append (BUILDERS = {'BALL': ball}) +#ball = Builder (prefix = env['ballprefix'] + '/', +#action = 'ln $SOURCE $TARGET') +#env.Append (BUILDERS = {'BALL': ball}) diff --git a/flower/SConscript b/flower/SConscript index 08730ef0e3..f88a2a11da 100644 --- a/flower/SConscript +++ b/flower/SConscript @@ -20,6 +20,11 @@ if env['static']: if not env['static'] or env['shared']: e.SharedLibrary (name, sources) -#testing -all_sources = ['SConscript',] + sources + includes -x = env.Tar (env['tarball'], all_sources) +all_sources = ['SConscript',] + sources + includes +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)) diff --git a/lily/SConscript b/lily/SConscript index 1179f18069..d64d17ad71 100644 --- a/lily/SConscript +++ b/lily/SConscript @@ -42,7 +42,10 @@ env.Alias ('install', env['bindir']) env.Alias ('lily', lily) - -#testing all_sources = ['SConscript',] + sources + includes -x = env.Tar (env['tarball'], all_sources) +# 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)) -- 2.39.2