зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1043692 - Add a DIST_INSTALL variable to moz.build, and replace NO_DIST_INSTALL with it. r=gps
This commit is contained in:
Родитель
23f754db72
Коммит
fe90037862
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['TARGET_CPU'].endswith('86'):
|
||||
cpu = 'x86'
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
DIRS += ['inject']
|
||||
|
||||
if not CONFIG['CROSS_COMPILE']:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
with Files('**'):
|
||||
BUG_COMPONENT = ('Core', 'Build Config')
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
# 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.
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
SOURCES += [
|
||||
'gmp-fake.cpp',
|
||||
'gmp-test-decryptor.cpp',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
UNIFIED_SOURCES += [ '%s/%s' % (relative_path, p) for p in [
|
||||
'nptest.cpp',
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'xpctest_attributes.cpp',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
SOURCES += [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
SOURCES += [
|
||||
'dummy_replace_malloc.c',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
SimplePrograms([
|
||||
'TestZip',
|
||||
|
|
|
@ -318,6 +318,21 @@ class FinalTargetValue(ContextDerivedValue, unicode):
|
|||
return unicode.__new__(cls, value)
|
||||
|
||||
|
||||
def Enum(*values):
|
||||
assert len(values)
|
||||
default = values[0]
|
||||
|
||||
class EnumClass(object):
|
||||
def __new__(cls, value=None):
|
||||
if value is None:
|
||||
return default
|
||||
if value in values:
|
||||
return value
|
||||
raise ValueError('Invalid value. Allowed values are: %s'
|
||||
% ', '.join(repr(v) for v in values))
|
||||
return EnumClass
|
||||
|
||||
|
||||
class SourcePath(ContextDerivedValue, UserString):
|
||||
"""Stores and resolves a source path relative to a given context
|
||||
|
||||
|
@ -1094,11 +1109,17 @@ VARIABLES = {
|
|||
ends with ``HOST_BIN_SUFFIX``, ``HOST_PROGRAM`` will remain unchanged.
|
||||
""", None),
|
||||
|
||||
'NO_DIST_INSTALL': (bool, bool,
|
||||
"""Disable installing certain files into the distribution directory.
|
||||
'DIST_INSTALL': (Enum(None, False, True), bool,
|
||||
"""Whether to install certain files into the dist directory.
|
||||
|
||||
If present, some files defined by other variables won't be
|
||||
distributed/shipped with the produced build.
|
||||
By default, some files types are installed in the dist directory, and
|
||||
some aren't. Set this variable to True to force the installation of
|
||||
some files that wouldn't be installed by default. Set this variable to
|
||||
False to force to not install some files that would be installed by
|
||||
default.
|
||||
|
||||
This is confusing for historical reasons, but eventually, the behavior
|
||||
will be made explicit.
|
||||
""", None),
|
||||
|
||||
'JAR_MANIFESTS': (StrictOrderingOnAppendList, list,
|
||||
|
@ -1790,6 +1811,16 @@ DEPRECATION_HINTS = {
|
|||
'TEST_TOOL_DIRS': 'Please use the TEST_DIRS variable instead.',
|
||||
|
||||
'PARALLEL_DIRS': 'Please use the DIRS variable instead.',
|
||||
|
||||
'NO_DIST_INSTALL': '''
|
||||
Please use
|
||||
|
||||
DIST_INSTALL = False
|
||||
|
||||
instead of
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
''',
|
||||
}
|
||||
|
||||
# Make sure that all template variables have a deprecation hint.
|
||||
|
|
|
@ -842,7 +842,7 @@ class InstallationTarget(ContextDerived):
|
|||
self.xpiname = context.get('XPI_NAME', '')
|
||||
self.subdir = context.get('DIST_SUBDIR', '')
|
||||
self.target = context['FINAL_TARGET']
|
||||
self.enabled = not context.get('NO_DIST_INSTALL', False)
|
||||
self.enabled = context['DIST_INSTALL'] is not False
|
||||
|
||||
def is_custom(self):
|
||||
"""Returns whether or not the target is not derived from the default
|
||||
|
|
|
@ -559,7 +559,6 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
'EXTRA_PP_COMPONENTS',
|
||||
'FAIL_ON_WARNINGS',
|
||||
'USE_STATIC_LIBS',
|
||||
'NO_DIST_INSTALL',
|
||||
'PYTHON_UNIT_TESTS',
|
||||
'RCFILE',
|
||||
'RESFILE',
|
||||
|
@ -592,13 +591,19 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
if isinstance(context, TemplateContext) and context.template == 'Gyp':
|
||||
passthru.variables['IS_GYP_DIR'] = True
|
||||
|
||||
dist_install = context['DIST_INSTALL']
|
||||
if dist_install is True:
|
||||
passthru.variables['DIST_INSTALL'] = True
|
||||
elif dist_install is False:
|
||||
passthru.variables['NO_DIST_INSTALL'] = True
|
||||
|
||||
for obj in self._process_sources(context, passthru):
|
||||
yield obj
|
||||
|
||||
exports = context.get('EXPORTS')
|
||||
if exports:
|
||||
yield Exports(context, exports,
|
||||
dist_install=not context.get('NO_DIST_INSTALL', False))
|
||||
dist_install=dist_install is not False)
|
||||
|
||||
for obj in self._process_generated_files(context):
|
||||
yield obj
|
||||
|
@ -802,10 +807,10 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
raise SandboxValidationError('XPIDL_MODULE cannot be defined '
|
||||
'unless there are XPIDL_SOURCES', context)
|
||||
|
||||
if context['XPIDL_SOURCES'] and context['NO_DIST_INSTALL']:
|
||||
if context['XPIDL_SOURCES'] and context['DIST_INSTALL'] is False:
|
||||
self.log(logging.WARN, 'mozbuild_warning', dict(
|
||||
path=context.main_path),
|
||||
'{path}: NO_DIST_INSTALL has no effect on XPIDL_SOURCES.')
|
||||
'{path}: DIST_INSTALL = False has no effect on XPIDL_SOURCES.')
|
||||
|
||||
for idl in context['XPIDL_SOURCES']:
|
||||
yield XPIDLFile(context, mozpath.join(context.srcdir, idl),
|
||||
|
|
|
@ -6,7 +6,7 @@ EXTRA_COMPONENTS = ['dummy.manifest', 'fans.js', 'tans.js']
|
|||
EXTRA_PP_COMPONENTS=['fans.pp.js', 'tans.pp.js']
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@ SharedLibrary('pkcs11testmodule')
|
|||
# C_GetFunctionList needs to be exported. As it turns out, it's much easier to
|
||||
# just export all the symbols.
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
|
||||
MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# 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/.
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini', 'unit_ipc/xpcshell.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Program('updater-xpcshell')
|
||||
|
||||
updater_rel_path = '../'
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
DEFINES['UPDATER_XPCSHELL_CERT'] = True
|
||||
include('../updater-common.build')
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
SOURCES += [
|
||||
'TestComponent.cpp',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
SOURCES += [
|
||||
'TestComponent.cpp',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
DIST_INSTALL = False
|
||||
|
||||
SOURCES += [
|
||||
'TestComponent.cpp',
|
||||
|
|
Загрузка…
Ссылка в новой задаче