2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; 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')
|
|
|
|
|
2015-05-09 02:24:18 +03:00
|
|
|
DIST_INSTALL = False
|
2013-10-24 23:06:19 +04:00
|
|
|
# For sanity's sake, we compile nsinstall without the wrapped system
|
|
|
|
# headers, so that we can use it to set up the wrapped system headers.
|
2017-05-02 04:12:35 +03:00
|
|
|
NoVisibilityFlags()
|
2013-10-03 00:51:15 +04:00
|
|
|
|
2013-02-26 00:47:18 +04:00
|
|
|
CONFIGURE_SUBST_FILES += [
|
|
|
|
'doxygen.cfg',
|
|
|
|
'makefiles/test/Makefile',
|
|
|
|
'tests/src-simple/Makefile',
|
|
|
|
]
|
|
|
|
|
2013-06-11 19:31:11 +04:00
|
|
|
if CONFIG['HOST_OS_ARCH'] != 'WINNT':
|
2013-10-25 03:23:05 +04:00
|
|
|
HOST_SOURCES += [
|
2013-06-11 19:31:11 +04:00
|
|
|
'nsinstall.c',
|
|
|
|
'pathsub.c',
|
|
|
|
]
|
2016-02-18 03:03:01 +03:00
|
|
|
# stdc++compat depends on config/export, so avoid a circular
|
|
|
|
# dependency added by HostProgram depending on stdc++compat,
|
|
|
|
# while the program here is in C.
|
|
|
|
HostProgram('nsinstall_real', c_only=True)
|
2013-11-22 18:03:21 +04:00
|
|
|
|
2016-02-11 16:21:16 +03:00
|
|
|
if CONFIG['MOZ_SYSTEM_ICU']:
|
|
|
|
DEFINES['MOZ_SYSTEM_ICU'] = True
|
2014-07-28 19:51:12 +04:00
|
|
|
|
2016-11-16 17:59:22 +03:00
|
|
|
PYTHON_UNITTEST_MANIFESTS += [
|
|
|
|
'tests/python.ini',
|
2014-07-28 19:51:12 +04:00
|
|
|
]
|
2015-07-22 18:04:32 +03:00
|
|
|
|
2017-12-08 00:09:15 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['MOZ_OPTIMIZE']:
|
2015-07-22 18:04:32 +03:00
|
|
|
CFLAGS += ['-O3']
|
2015-08-31 03:05:38 +03:00
|
|
|
|
2015-09-08 18:35:43 +03:00
|
|
|
HOST_DEFINES = {
|
|
|
|
'UNICODE': True,
|
|
|
|
'_UNICODE': True,
|
|
|
|
}
|
2017-11-09 01:42:27 +03:00
|
|
|
|
|
|
|
include('stl-headers.mozbuild')
|
|
|
|
if CONFIG['WRAP_STL_INCLUDES']:
|
|
|
|
stl_compiler = None
|
2017-12-08 00:09:15 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
2017-11-09 01:42:27 +03:00
|
|
|
stl_compiler = 'gcc'
|
|
|
|
elif CONFIG['_MSC_VER']:
|
|
|
|
stl_compiler = 'msvc'
|
|
|
|
|
|
|
|
if stl_compiler:
|
|
|
|
template_file = SRCDIR + '/%s-stl-wrapper.template.h' % stl_compiler
|
|
|
|
output_dir = '../dist/stl_wrappers'
|
|
|
|
# We have to use a sentinel file as the first file because the
|
|
|
|
# file_generate action will create it for us, but we want to create all
|
|
|
|
# the files in gen_wrappers()
|
|
|
|
outputs = tuple(['stl.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers])
|
|
|
|
GENERATED_FILES += [outputs]
|
|
|
|
stl = GENERATED_FILES[outputs]
|
|
|
|
stl.script = 'make-stl-wrappers.py:gen_wrappers'
|
|
|
|
stl.flags = [output_dir, stl_compiler, template_file]
|
|
|
|
stl.flags.extend(stl_headers)
|
2017-11-09 03:58:56 +03:00
|
|
|
|
|
|
|
if CONFIG['WRAP_SYSTEM_INCLUDES']:
|
|
|
|
include('system-headers.mozbuild')
|
|
|
|
output_dir = '../dist/system_wrappers'
|
|
|
|
outputs = tuple(['system-header.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers + system_headers])
|
|
|
|
GENERATED_FILES += [outputs]
|
|
|
|
system = GENERATED_FILES[outputs]
|
|
|
|
system.script = 'make-system-wrappers.py:gen_wrappers'
|
|
|
|
system.flags = [output_dir]
|
|
|
|
system.flags.extend(stl_headers)
|
|
|
|
system.flags.extend(system_headers)
|