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 distibuted with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 from mozbuild
.preprocessor
import Preprocessor
12 def main(output
, input_file
):
14 pp
.context
.update(buildconfig
.defines
['ALLDEFINES'])
16 substs
= buildconfig
.substs
18 # Substs taken verbatim.
22 for var
in substs_vars
:
23 pp
.context
[var
] = '"%s"' % substs
[var
]
26 for key
, condition
in (
27 ('IS_MAC', substs
['OS_ARCH'] == 'Darwin'),
28 ('IS_LINUX', substs
['OS_ARCH'] == 'Linux'),
29 ('IS_TEST_BUILD', substs
.get('ENABLE_TESTS') == '1'),
30 ('IS_DEBUG_BUILD', substs
.get('MOZ_DEBUG') == '1'),
31 ('CRASHREPORTER', substs
.get('MOZ_CRASHREPORTER')),
32 ('IS_ASAN', substs
.get('MOZ_ASAN'))):
39 'XPC_BIN_PATH': '"%s/dist/bin"' % buildconfig
.topobjdir
,
40 'CERTS_SRC_DIR': '"%s/build/pgo/certs"' % buildconfig
.topsrcdir
,
44 pp
.do_include(input_file
)
47 if __name__
== '__main__':