1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 BUG_COMPONENT = ('Firefox Build System', 'General')
10 # This cannot be named "build" because of bug 922191.
11 SPHINX_TREES['buildsystem'] = 'docs'
13 with Files('docs/**'):
14 SCHEDULES.exclusive = ['docs']
16 if CONFIG['OS_ARCH'] == 'WINNT':
21 CRAMTEST_MANIFESTS += [
22 'tests/cram/cram.ini',
25 DEFINES['ACCEPTED_MAR_CHANNEL_IDS'] = CONFIG['ACCEPTED_MAR_CHANNEL_IDS']
27 if CONFIG['MOZ_BUILD_APP'] == 'browser':
28 PYTHON_UNITTEST_MANIFESTS += [
29 'compare-mozconfig/python.ini',
32 if CONFIG['ENABLE_TESTS'] or CONFIG['MOZ_DMD']:
33 FINAL_TARGET_FILES += ['/tools/rb/fix_stacks.py']
36 FINAL_TARGET_FILES += ['/memory/replace/dmd/dmd.py']
38 # Put a useful .gdbinit and .gdbinit.py in $objdir/build, to be picked up
39 # automatically by GDB via either libxul.so-gdb.py or js-gdb.py.
40 OBJDIR_PP_FILES.build += ['.gdbinit.py.in']
41 OBJDIR_FILES.build += ['.gdbinit.loader']
42 OBJDIR_FILES.build += ['.gdbinit']
44 # Install the clang-cl runtime library for ASAN next to the binaries we produce.
45 if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl':
46 FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
47 FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH'].replace(".dll", ".pdb")]
49 # Install the clang runtime library for ASAN next to the binaries we produce.
50 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android' and CONFIG['MOZ_ASAN']:
51 FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
53 if CONFIG['LLVM_SYMBOLIZER']:
54 FINAL_TARGET_FILES += ['/' + CONFIG['LLVM_SYMBOLIZER']]
56 if CONFIG['MOZ_APP_BASENAME']:
58 'TOPOBJDIR': TOPOBJDIR,
61 for var in ('GRE_MILESTONE', 'MOZ_APP_VERSION', 'MOZ_APP_BASENAME',
62 'MOZ_APP_VENDOR', 'MOZ_APP_ID', 'MAR_CHANNEL_ID',
63 'MOZ_APP_REMOTINGNAME'):
64 appini_defines[var] = CONFIG[var]
66 if CONFIG['MOZ_APP_DISPLAYNAME'] != CONFIG['MOZ_APP_BASENAME']:
67 appini_defines['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME']
69 if CONFIG['MOZ_BUILD_APP'] == 'browser':
70 appini_defines['MOZ_BUILD_APP_IS_BROWSER'] = True
72 if CONFIG['MOZ_APP_PROFILE']:
73 appini_defines['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
75 for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR', 'MOZ_UPDATER'):
77 appini_defines[var] = True
79 appini_defines['MOZ_APPUPDATE_HOST'] = 'aus5.mozilla.org'
80 if CONFIG['MOZ_APPUPDATE_HOST']:
81 appini_defines['MOZ_APPUPDATE_HOST'] = CONFIG['MOZ_APPUPDATE_HOST']
85 script='../python/mozbuild/mozbuild/action/preprocessor.py',
86 entry_point='generate',
87 inputs=['application.ini.in'],
88 flags=['-D%s=%s' % (k, '1' if v is True else v)
89 for k, v in sorted(appini_defines.items(), key=lambda t: t[0])])
91 FINAL_TARGET_FILES += ['!application.ini']
92 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
93 FINAL_TARGET_PP_FILES += ['update-settings.ini']
95 GeneratedFile('application.ini.h', script='appini_header.py',
96 inputs=['!application.ini'])
99 # Put a .lldbinit in the bin directory and the objdir, to be picked up
100 # automatically by LLDB when we debug executables using either of those two
101 # directories as the current working directory. The .lldbinit file will
102 # load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
103 DEFINES['topsrcdir'] = TOPSRCDIR
104 DEFINES['topobjdir'] = TOPOBJDIR
105 FINAL_TARGET_PP_FILES += ['.lldbinit.in']
106 OBJDIR_FILES += ['!/dist/bin/.lldbinit']
108 # Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
109 # the vim plugin YouCompleteMe.
110 OBJDIR_FILES += ['/.ycm_extra_conf.py']
112 if CONFIG['MOZ_VALGRIND']:
113 OBJDIR_FILES._valgrind += [
114 'valgrind/cross-architecture.sup',
115 'valgrind/i386-pc-linux-gnu.sup',
116 'valgrind/x86_64-pc-linux-gnu.sup',