Speed up default scons case by not computing the distribution tarball manifest.
This commit is contained in:
parent
b5add44a17
commit
611d8099f1
1 changed files with 24 additions and 21 deletions
45
SConstruct
45
SConstruct
|
@ -78,9 +78,9 @@ The following special build targets
|
|||
install-wesnothd = install the Wesnoth multiplayer server.
|
||||
install-campaignd = install the Wesnoth campaign server.
|
||||
uninstall = uninstall all executables, tools, and servers.
|
||||
wesnoth.tar.bz2 = make distribution tarball (*).
|
||||
wesnoth-data.tar.bz2 = make data tarball (*).
|
||||
wesnoth-binaries.tar.bz2 = make data tarball (*).
|
||||
dist = make distribution tarball as wesnoth.tar.bz2 (*).
|
||||
data-dist = make data tarball as wesnoth-data.tar.bz2 (*).
|
||||
binary_dist = make data tarball as wesnoth-binaries.tar.bz2 (*).
|
||||
wesnoth-bundle = make Mac OS application bundle from game (*)
|
||||
wesnoth-editor-bundle = make Mac OS application bundle from editor (*).
|
||||
sanity-check = run a pre-release sanity check on the distribution.
|
||||
|
@ -1012,24 +1012,27 @@ env.Command("manual.en.html", "manual.en.xml",
|
|||
#
|
||||
# Making a distribution tarball.
|
||||
#
|
||||
def manifest():
|
||||
"Get an argument list suitable for passing to a distribution archiver."
|
||||
# Start by getting a list of all files under version control
|
||||
lst = commands.getoutput("svn -v status | awk '/^[^?]/ {print $4;}'")
|
||||
# Omit everything with a data/ prefix to cut the list length below the
|
||||
# shell argument limit, otherwise the archiver command will blow up.
|
||||
lst = filter(lambda f: os.path.isfile(f) and not f.startswith("data/"),
|
||||
lst.split())
|
||||
# Add data/ back to the end of the list. This is safe only because we
|
||||
# assume there will be no junk under data/. But we'll filter out
|
||||
# filenames with tildes in them (Emacs backup files) just in case.
|
||||
lst.append("data/")
|
||||
return lst
|
||||
tarball = env.Tar('wesnoth.tar.bz2', manifest() + ["src/revision.hpp"])
|
||||
env.Append(TARFLAGS='-j --exclude=".svn" --exclude="~"',
|
||||
TARCOMSTR="Making tarball...")
|
||||
env.Clean(all, 'wesnoth.tar.bz2')
|
||||
env.Alias('dist', tarball)
|
||||
if 'dist' in COMMAND_LINE_TARGETS: # Speedup, the manifest is expensive
|
||||
def dist_manifest():
|
||||
"Get an argument list suitable for passing to a distribution archiver."
|
||||
# Start by getting a list of all files under version control
|
||||
lst = commands.getoutput("svn -v status | awk '/^[^?]/ {print $4;}'")
|
||||
# Omit everything with a data/ prefix to cut the list length below the
|
||||
# shell argument limit, otherwise the archiver command will blow up.
|
||||
lst = filter(lambda f: os.path.isfile(f) and not f.startswith("data/"),
|
||||
lst.split())
|
||||
# Add data/ back to the end of the list. This is safe only because we
|
||||
# assume there will be no junk under data/. But we'll filter out
|
||||
# filenames with tildes in them (Emacs backup files) just in case.
|
||||
lst.append("data/")
|
||||
return lst
|
||||
dist_env = env.Clone()
|
||||
dist_tarball = env.Tar('wesnoth.tar.bz2',
|
||||
dist_manifest()+["src/revision.hpp"])
|
||||
dist_env.Append(TARFLAGS='-j --exclude=".svn" --exclude="~"',
|
||||
TARCOMSTR="Making distribution tarball...")
|
||||
env.Clean(all, 'wesnoth.tar.bz2')
|
||||
env.Alias('dist', dist_tarball)
|
||||
|
||||
#
|
||||
# Making Mac OS X application bundles
|
||||
|
|
Loading…
Add table
Reference in a new issue