diff options
Diffstat (limited to 'linden/indra/SConstruct')
-rw-r--r-- | linden/indra/SConstruct | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index 9353317..0f9f237 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct | |||
@@ -100,6 +100,8 @@ opts.AddOptions( | |||
100 | BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), | 100 | BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), |
101 | BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), | 101 | BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), |
102 | BoolOption('RUNTESTS', 'Run tests at end of compilation', True), | 102 | BoolOption('RUNTESTS', 'Run tests at end of compilation', True), |
103 | BoolOption('MAKE_PACKAGE', 'Create a package (tarball) after compiling "releasefordownload".', True), | ||
104 | PathOption('BUILD_DIR', 'Specify full path to build directory. If omitted, use default build directory.', '', PathOption.PathAccept), | ||
103 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line | 105 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line |
104 | ) | 106 | ) |
105 | optenv = Environment(options = opts) | 107 | optenv = Environment(options = opts) |
@@ -120,6 +122,7 @@ runtests = optenv['RUNTESTS'] | |||
120 | opensource = standalone or optenv['OPENSOURCE'] | 122 | opensource = standalone or optenv['OPENSOURCE'] |
121 | enable_fmod = not opensource and optenv['FMOD'] | 123 | enable_fmod = not opensource and optenv['FMOD'] |
122 | elfio = optenv['ELFIO'] | 124 | elfio = optenv['ELFIO'] |
125 | make_package = optenv['MAKE_PACKAGE'] | ||
123 | 126 | ||
124 | targets = [ target_param ] | 127 | targets = [ target_param ] |
125 | 128 | ||
@@ -205,12 +208,19 @@ for build_target in targets: | |||
205 | system_lib_dir += '/lib_release' | 208 | system_lib_dir += '/lib_release' |
206 | lib_dir = './lib_release_' + build_target + '/' + system_str | 209 | lib_dir = './lib_release_' + build_target + '/' + system_str |
207 | 210 | ||
208 | try: | 211 | |
209 | build_dir_prefix = os.environ['TEMP_BUILD_DIR'] | 212 | build_dir = optenv['BUILD_DIR'] |
210 | except: | 213 | if build_dir != '': |
211 | build_dir_prefix = '/tmp/' + os.environ['USER'] | 214 | # Validate directory, and create if needed. |
212 | 215 | # This is a hack to get around SCons' inflexibility. | |
213 | build_dir = build_dir_prefix + os.getcwd() + '/' + system_str + '-' + build_target + '-' + buildtype | 216 | PathOption.PathIsDirCreate("BUILD_DIR", build_dir, optenv) |
217 | else: | ||
218 | try: | ||
219 | build_dir_prefix = os.environ['TEMP_BUILD_DIR'] | ||
220 | except: | ||
221 | build_dir_prefix = '/tmp/' + os.environ['USER'] + os.getcwd() + '/' | ||
222 | |||
223 | build_dir = build_dir_prefix + system_str + '-' + build_target + '-' + buildtype | ||
214 | 224 | ||
215 | ### Base include directories ### | 225 | ### Base include directories ### |
216 | 226 | ||
@@ -717,6 +727,8 @@ for build_target in targets: | |||
717 | 'arch':arch} | 727 | 'arch':arch} |
718 | if login_channel: | 728 | if login_channel: |
719 | cmd += ' --login_channel=\'Second Life %s\'' % (login_channel) | 729 | cmd += ' --login_channel=\'Second Life %s\'' % (login_channel) |
730 | if not make_package: | ||
731 | cmd += ' --actions="copy"' | ||
720 | env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) | 732 | env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) |
721 | Depends('newview/' + package_name, output_bin + '-stripped') | 733 | Depends('newview/' + package_name, output_bin + '-stripped') |
722 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') | 734 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') |