Bug 1500160 [wpt PR 13600] - Add tests for simple dialog newline normalization, a...
[gecko.git] / build / moz.build
blobbb9d9befdec3f49cbaf2045654a0dd98b999cab8
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/.
7 with Files('**'):
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':
17     DIRS += ['win32']
18     if CONFIG['WIN64_CARGO_LINKER']:
19         CONFIGURE_SUBST_FILES += ['win64/cargo-linker.bat']
20 else:
21     DIRS += ['unix']
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',
32     ]
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']
41 if CONFIG['MOZ_DMD']:
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']:
59     appini_defines = {
60         'TOPOBJDIR': TOPOBJDIR,
61     }
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'):
78         if CONFIG[var]:
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 += [
104         '!automation.py',
105     ]
107     TEST_HARNESS_FILES.testing.mochitest += [
108         '!automation.py',
109     ]
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 FINAL_TARGET_PP_FILES += ['.lldbinit.in']
120 OBJDIR_FILES += ['!/dist/bin/.lldbinit']
122 # Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
123 # the vim plugin YouCompleteMe.
124 OBJDIR_FILES += ['/.ycm_extra_conf.py']
126 if CONFIG['MOZ_VALGRIND']:
127     OBJDIR_FILES._valgrind += [
128         'valgrind/cross-architecture.sup',
129         'valgrind/i386-pc-linux-gnu.sup',
130         'valgrind/x86_64-pc-linux-gnu.sup',
131     ]