2013-04-01 22:36:59 +04:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:18 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2015-02-26 22:43:45 +03:00
|
|
|
with Files('**'):
|
|
|
|
BUG_COMPONENT = ('Core', 'Build Config')
|
|
|
|
|
2013-12-18 23:15:45 +04:00
|
|
|
# This cannot be named "build" because of bug 922191.
|
|
|
|
SPHINX_TREES['buildsystem'] = 'docs'
|
2013-11-21 00:37:22 +04:00
|
|
|
|
2014-02-11 02:57:01 +04:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
2013-02-26 00:47:18 +04:00
|
|
|
DIRS += ['win32']
|
2014-02-11 02:57:01 +04:00
|
|
|
else:
|
|
|
|
DIRS += ['unix']
|
2013-02-26 00:47:18 +04:00
|
|
|
|
2015-10-15 10:27:45 +03:00
|
|
|
if CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_ANDROID_CXX_STL'] == 'mozstlport':
|
2013-02-26 00:47:18 +04:00
|
|
|
DIRS += ['stlport']
|
2016-07-11 16:16:56 +03:00
|
|
|
if CONFIG['ENABLE_INTL_API']:
|
2015-10-20 08:25:44 +03:00
|
|
|
DIRS += ['gabi++']
|
2013-02-26 00:47:18 +04:00
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2013-10-10 04:05:37 +04:00
|
|
|
DIRS += ['annotationProcessors']
|
2013-02-26 00:47:18 +04:00
|
|
|
|
2013-11-27 17:55:07 +04:00
|
|
|
for var in ('GRE_MILESTONE', 'MOZ_APP_VERSION', 'MOZ_APP_BASENAME',
|
|
|
|
'MOZ_APP_VENDOR', 'MOZ_APP_ID', 'MAR_CHANNEL_ID',
|
2014-09-23 22:49:03 +04:00
|
|
|
'ACCEPTED_MAR_CHANNEL_IDS', 'MOZ_APP_REMOTINGNAME'):
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES[var] = CONFIG[var]
|
|
|
|
|
2014-02-20 13:42:28 +04:00
|
|
|
if CONFIG['MOZ_APP_DISPLAYNAME'] != CONFIG['MOZ_APP_BASENAME']:
|
|
|
|
DEFINES['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME']
|
|
|
|
|
2013-11-27 17:55:07 +04:00
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
|
|
|
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_APP_PROFILE']:
|
|
|
|
DEFINES['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
|
|
|
|
|
|
|
|
for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR',
|
2014-08-26 11:50:07 +04:00
|
|
|
'MOZ_APP_STATIC_INI'):
|
2013-11-27 17:55:07 +04:00
|
|
|
if CONFIG[var]:
|
|
|
|
DEFINES[var] = True
|
|
|
|
|
2014-07-28 19:51:12 +04:00
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
|
|
|
PYTHON_UNIT_TESTS += [
|
|
|
|
'compare-mozconfig/compare-mozconfigs-wrapper.py',
|
|
|
|
]
|
2015-02-20 21:26:59 +03:00
|
|
|
|
|
|
|
if CONFIG['ENABLE_TESTS'] or CONFIG['MOZ_DMD']:
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['/tools/rb/fix_stack_using_bpsyms.py']
|
2015-02-20 21:26:59 +03:00
|
|
|
if CONFIG['OS_ARCH'] == 'Darwin':
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['/tools/rb/fix_macosx_stack.py']
|
2015-02-20 21:26:59 +03:00
|
|
|
if CONFIG['OS_ARCH'] == 'Linux':
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['/tools/rb/fix_linux_stack.py']
|
2015-02-20 21:26:59 +03:00
|
|
|
|
|
|
|
if CONFIG['MOZ_DMD']:
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['/memory/replace/dmd/dmd.py']
|
2015-02-23 16:27:45 +03:00
|
|
|
|
|
|
|
# Put a useful .gdbinit in the bin directory, to be picked up automatically
|
|
|
|
# by GDB when we debug executables there.
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['/.gdbinit']
|
2014-03-19 21:53:16 +04:00
|
|
|
FINAL_TARGET_PP_FILES += ['.gdbinit_python.in']
|
|
|
|
OBJDIR_FILES += ['!/dist/bin/.gdbinit_python']
|
2015-02-23 16:29:12 +03:00
|
|
|
|
|
|
|
# Install the clang-cl runtime library for ASAN next to the binaries we produce.
|
|
|
|
if CONFIG['MOZ_ASAN'] and CONFIG['CLANG_CL']:
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
|
2015-04-15 23:04:49 +03:00
|
|
|
|
|
|
|
if CONFIG['MOZ_APP_BASENAME']:
|
2015-11-27 03:09:07 +03:00
|
|
|
FINAL_TARGET_PP_FILES += ['application.ini']
|
2015-04-15 23:04:49 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
|
2015-11-27 03:09:07 +03:00
|
|
|
FINAL_TARGET_PP_FILES += ['update-settings.ini']
|
2016-02-09 08:36:07 +03:00
|
|
|
|
2016-04-29 20:45:07 +03:00
|
|
|
if CONFIG['MOZ_APP_STATIC_INI']:
|
|
|
|
GENERATED_FILES += ['application.ini.h']
|
|
|
|
appini = GENERATED_FILES['application.ini.h']
|
|
|
|
appini.script = 'appini_header.py'
|
|
|
|
appini.inputs = ['!/dist/bin/application.ini']
|
|
|
|
|
2016-02-09 08:36:07 +03:00
|
|
|
DEFINES['TOPOBJDIR'] = TOPOBJDIR
|
2016-03-21 18:45:03 +03:00
|
|
|
|
|
|
|
# NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
|
|
|
|
OBJDIR_FILES += ['/.gdbinit']
|
|
|
|
|
|
|
|
# Put a .lldbinit in the bin directory and the objdir, to be picked up
|
|
|
|
# automatically by LLDB when we debug executables using either of those two
|
|
|
|
# directories as the current working directory. The .lldbinit file will
|
|
|
|
# load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
|
|
|
|
DEFINES['topsrcdir'] = TOPSRCDIR
|
|
|
|
FINAL_TARGET_PP_FILES += ['.lldbinit.in']
|
|
|
|
OBJDIR_FILES += ['!/dist/bin/.lldbinit']
|
|
|
|
|
|
|
|
# Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
|
|
|
|
# the vim plugin YouCompleteMe.
|
|
|
|
OBJDIR_FILES += ['/.ycm_extra_conf.py']
|
|
|
|
|
|
|
|
if CONFIG['MOZ_VALGRIND']:
|
|
|
|
OBJDIR_FILES._valgrind += [
|
|
|
|
'valgrind/cross-architecture.sup',
|
|
|
|
'valgrind/i386-redhat-linux-gnu.sup',
|
|
|
|
'valgrind/x86_64-redhat-linux-gnu.sup',
|
|
|
|
]
|