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')
9 with Files("mobile/**"):
10 BUG_COMPONENT = ("Firefox for Android", "Testing")
12 # This cannot be named "build" because of bug 922191.
13 SPHINX_TREES['buildsystem'] = 'docs'
15 with Files('docs/**'):
16 SCHEDULES.exclusive = ['docs']
18 if CONFIG['OS_ARCH'] == 'WINNT':
23 CRAMTEST_MANIFESTS += [
24 'tests/cram/cram.ini',
27 DEFINES['ACCEPTED_MAR_CHANNEL_IDS'] = CONFIG['ACCEPTED_MAR_CHANNEL_IDS']
29 if CONFIG['MOZ_BUILD_APP'] == 'browser':
30 PYTHON_UNITTEST_MANIFESTS += [
31 'compare-mozconfig/python.ini',
34 if CONFIG['ENABLE_TESTS'] or CONFIG['MOZ_DMD']:
35 FINAL_TARGET_FILES += ['/tools/rb/fix_stack_using_bpsyms.py']
36 if CONFIG['OS_ARCH'] == 'Darwin':
37 FINAL_TARGET_FILES += ['/tools/rb/fix_macosx_stack.py']
38 if CONFIG['OS_ARCH'] == 'Linux':
39 FINAL_TARGET_FILES += ['/tools/rb/fix_linux_stack.py']
42 FINAL_TARGET_FILES += ['/memory/replace/dmd/dmd.py']
44 # Put a useful .gdbinit in the bin directory, to be picked up automatically
45 # by GDB when we debug executables there.
46 FINAL_TARGET_FILES += ['/.gdbinit']
47 FINAL_TARGET_PP_FILES += ['.gdbinit_python.in']
48 OBJDIR_FILES += ['!/dist/bin/.gdbinit_python']
50 # Install the clang-cl runtime library for ASAN next to the binaries we produce.
51 if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl':
52 FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
53 FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH'].replace(".dll", ".pdb")]
55 if CONFIG['LLVM_SYMBOLIZER']:
56 FINAL_TARGET_FILES += ['/' + CONFIG['LLVM_SYMBOLIZER']]
58 if CONFIG['MOZ_APP_BASENAME']:
60 'TOPOBJDIR': TOPOBJDIR,
63 for var in ('GRE_MILESTONE', 'MOZ_APP_VERSION', 'MOZ_APP_BASENAME',
64 'MOZ_APP_VENDOR', 'MOZ_APP_ID', 'MAR_CHANNEL_ID',
65 'MOZ_APP_REMOTINGNAME'):
66 appini_defines[var] = CONFIG[var]
68 if CONFIG['MOZ_APP_DISPLAYNAME'] != CONFIG['MOZ_APP_BASENAME']:
69 appini_defines['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME']
71 if CONFIG['MOZ_BUILD_APP'] == 'browser':
72 appini_defines['MOZ_BUILD_APP_IS_BROWSER'] = True
74 if CONFIG['MOZ_APP_PROFILE']:
75 appini_defines['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
77 for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR'):
79 appini_defines[var] = True
81 GENERATED_FILES += ['application.ini']
83 appini = GENERATED_FILES['application.ini']
84 appini.script = '../python/mozbuild/mozbuild/action/preprocessor.py:generate'
85 appini.inputs = ['application.ini.in']
86 appini.flags = ['-D%s=%s' % (k, '1' if v is True else v)
87 for k, v in appini_defines.iteritems()]
88 FINAL_TARGET_FILES += ['!application.ini']
89 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
90 FINAL_TARGET_PP_FILES += ['update-settings.ini']
92 GENERATED_FILES += ['application.ini.h']
93 appini = GENERATED_FILES['application.ini.h']
94 appini.script = 'appini_header.py'
95 appini.inputs = ['!application.ini']
97 if CONFIG['ENABLE_TESTS']:
98 GENERATED_FILES += ['automation.py']
99 auto = GENERATED_FILES['automation.py']
100 auto.script = 'gen_automation.py'
101 auto.inputs = ['automation.py.in']
103 TEST_HARNESS_FILES.reftest += [
107 TEST_HARNESS_FILES.testing.mochitest += [
111 # NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
112 OBJDIR_FILES += ['/.gdbinit']
114 # Put a .lldbinit in the bin directory and the objdir, to be picked up
115 # automatically by LLDB when we debug executables using either of those two
116 # directories as the current working directory. The .lldbinit file will
117 # load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
118 DEFINES['topsrcdir'] = TOPSRCDIR
119 DEFINES['topobjdir'] = TOPOBJDIR
120 FINAL_TARGET_PP_FILES += ['.lldbinit.in']
121 OBJDIR_FILES += ['!/dist/bin/.lldbinit']
123 # Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
124 # the vim plugin YouCompleteMe.
125 OBJDIR_FILES += ['/.ycm_extra_conf.py']
127 if CONFIG['MOZ_VALGRIND']:
128 OBJDIR_FILES._valgrind += [
129 'valgrind/cross-architecture.sup',
130 'valgrind/i386-pc-linux-gnu.sup',
131 'valgrind/x86_64-pc-linux-gnu.sup',