0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-10324 Allow modules to add files to different archive subdirectories

This CR is 1 of 2 covering the open source server repo component
of https://jira.mongodb.org/browse/SERVER-10324. It supplants
http://codereview.10gen.com/4892644241047552/
This commit is contained in:
Ernie Hershey 2014-01-17 19:53:05 -05:00
parent 30deba805e
commit 95fd79cb23
2 changed files with 12 additions and 2 deletions

View File

@ -451,6 +451,8 @@ env = Environment( BUILD_DIR=variantDir,
DIST_ARCHIVE_SUFFIX='.tgz',
EXTRAPATH=get_option("extrapath"),
MODULE_BANNERS=[],
ARCHIVE_ADDITION_DIR_MAP={},
ARCHIVE_ADDITIONS=[],
MODULETEST_ALIAS='moduletests',
MODULETEST_LIST='#build/moduletests.txt',
MSVS_ARCH=msarch ,

View File

@ -1209,10 +1209,18 @@ if not len(module_banner_filenames) == len(env['MODULE_BANNERS']):
module_banner_dirs = set([Dir('#').rel_path(f.get_dir()) for f in env['MODULE_BANNERS']])
module_banner_transforms = ["--transform %s=$SERVER_DIST_BASENAME" % d for d in module_banner_dirs]
# Allow modules to map original file name directories to subdirectories
# within the archive (e.g. { "src/mongo/db/modules/enterprise/docs": "snmp"})
archive_addition_transforms = []
for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items():
archive_addition_transforms.append("--transform %s=$SERVER_DIST_BASENAME/%s" %
(full_dir, archive_dir))
env.Command(
'#/${SERVER_ARCHIVE}',
['#buildscripts/make_archive.py'] + env["MODULE_BANNERS"] + distBinaries,
' '.join(['$PYTHON ${SOURCES[0]} -o $TARGET'] + module_banner_transforms + [
['#buildscripts/make_archive.py'] + env["MODULE_BANNERS"] + env["ARCHIVE_ADDITIONS"] +
distBinaries, ' '.join(['$PYTHON ${SOURCES[0]} -o $TARGET'] + archive_addition_transforms +
module_banner_transforms + [
'--transform ${str(Dir(BUILD_DIR))}/mongo/stripped=$SERVER_DIST_BASENAME/bin',
'--transform ${str(Dir(BUILD_DIR))}/mongo=$SERVER_DIST_BASENAME/bin',
'${TEMPFILE(SOURCES[1:])}']))