mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1229279
- Use mozbuild.context.Path for FINAL_TARGET{_PP}_FILES. r=gps
This commit is contained in:
parent
a08644bd2f
commit
fe46da75a8
@ -5,7 +5,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
JS_PREFERENCE_FILES += [
|
||||
'pref/firefox-branding.js',
|
||||
'/%s/pref/firefox-branding.js' % CONFIG['MOZ_BRANDING_DIRECTORY'],
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||
|
@ -54,23 +54,22 @@ if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
||||
]
|
||||
|
||||
if CONFIG['ENABLE_TESTS'] or CONFIG['MOZ_DMD']:
|
||||
tools_dir = TOPSRCDIR + '/tools/rb/'
|
||||
FINAL_TARGET_FILES += [tools_dir + 'fix_stack_using_bpsyms.py']
|
||||
FINAL_TARGET_FILES += ['/tools/rb/fix_stack_using_bpsyms.py']
|
||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
FINAL_TARGET_FILES += [tools_dir + 'fix_macosx_stack.py']
|
||||
FINAL_TARGET_FILES += ['/tools/rb/fix_macosx_stack.py']
|
||||
if CONFIG['OS_ARCH'] == 'Linux':
|
||||
FINAL_TARGET_FILES += [tools_dir + 'fix_linux_stack.py']
|
||||
FINAL_TARGET_FILES += ['/tools/rb/fix_linux_stack.py']
|
||||
|
||||
if CONFIG['MOZ_DMD']:
|
||||
FINAL_TARGET_FILES += [TOPSRCDIR + '/memory/replace/dmd/dmd.py']
|
||||
FINAL_TARGET_FILES += ['/memory/replace/dmd/dmd.py']
|
||||
|
||||
# Put a useful .gdbinit in the bin directory, to be picked up automatically
|
||||
# by GDB when we debug executables there.
|
||||
FINAL_TARGET_FILES += [TOPSRCDIR + '/.gdbinit']
|
||||
FINAL_TARGET_FILES += ['/.gdbinit']
|
||||
|
||||
# Install the clang-cl runtime library for ASAN next to the binaries we produce.
|
||||
if CONFIG['MOZ_ASAN'] and CONFIG['CLANG_CL']:
|
||||
FINAL_TARGET_FILES += [CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
|
||||
FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
|
||||
|
||||
if CONFIG['MOZ_APP_BASENAME']:
|
||||
FINAL_TARGET_PP_FILES += ['application.ini']
|
||||
|
@ -77,13 +77,14 @@ class FasterMakeBackend(CommonBackend):
|
||||
elif isinstance(obj, (FinalTargetFiles,
|
||||
FinalTargetPreprocessedFiles)) and \
|
||||
obj.install_target.startswith('dist/bin'):
|
||||
for path, strings in obj.files.walk():
|
||||
for f in strings:
|
||||
for path, files in obj.files.walk():
|
||||
for f in files:
|
||||
if isinstance(obj, FinalTargetPreprocessedFiles):
|
||||
self._add_preprocess(obj, f, path, defines=defines)
|
||||
self._add_preprocess(obj, f.full_path, path,
|
||||
defines=defines)
|
||||
else:
|
||||
self._install_manifests[obj.install_target].add_symlink(
|
||||
mozpath.join(obj.srcdir, f),
|
||||
f.full_path,
|
||||
mozpath.join(path, mozpath.basename(f))
|
||||
)
|
||||
|
||||
|
@ -1316,20 +1316,20 @@ INSTALL_TARGETS += %(prefix)s
|
||||
else:
|
||||
raise Exception("Cannot install to " + target)
|
||||
|
||||
for path, strings in files.walk():
|
||||
for f in strings:
|
||||
source = mozpath.normpath(os.path.join(obj.srcdir, f))
|
||||
for path, files in files.walk():
|
||||
for f in files:
|
||||
dest = mozpath.join(reltarget, path, mozpath.basename(f))
|
||||
install_manifest.add_symlink(source, dest)
|
||||
install_manifest.add_symlink(f.full_path, dest)
|
||||
|
||||
def _process_final_target_pp_files(self, obj, files, backend_file):
|
||||
# We'd like to install these via manifests as preprocessed files.
|
||||
# But they currently depend on non-standard flags being added via
|
||||
# some Makefiles, so for now we just pass them through to the
|
||||
# underlying Makefile.in.
|
||||
for i, (path, strings) in enumerate(files.walk()):
|
||||
for f in strings:
|
||||
backend_file.write('DIST_FILES_%d += %s\n' % (i, f))
|
||||
for i, (path, files) in enumerate(files.walk()):
|
||||
for f in files:
|
||||
backend_file.write('DIST_FILES_%d += %s\n' % (
|
||||
i, self._pretty_path(f, backend_file)))
|
||||
backend_file.write('DIST_FILES_%d_PATH := $(DEPTH)/%s\n'
|
||||
% (i, mozpath.join(obj.install_target, path)))
|
||||
backend_file.write('PP_TARGETS += DIST_FILES_%d\n' % i)
|
||||
|
@ -1001,7 +1001,7 @@ VARIABLES = {
|
||||
break the build in subtle ways.
|
||||
""", 'misc'),
|
||||
|
||||
'FINAL_TARGET_FILES': (HierarchicalStringList, list,
|
||||
'FINAL_TARGET_FILES': (ContextDerivedTypedHierarchicalStringList(Path), list,
|
||||
"""List of files to be installed into the application directory.
|
||||
|
||||
``FINAL_TARGET_FILES`` will copy (or symlink, if the platform supports it)
|
||||
@ -1021,11 +1021,11 @@ VARIABLES = {
|
||||
disabled.
|
||||
""", None),
|
||||
|
||||
'FINAL_TARGET_PP_FILES': (HierarchicalStringList, list,
|
||||
'FINAL_TARGET_PP_FILES': (ContextDerivedTypedHierarchicalStringList(Path), list,
|
||||
"""Like ``FINAL_TARGET_FILES``, with preprocessing.
|
||||
""", 'libs'),
|
||||
|
||||
'TESTING_FILES': (HierarchicalStringList, list,
|
||||
'TESTING_FILES': (ContextDerivedTypedHierarchicalStringList(Path), list,
|
||||
"""List of files to be installed in the _tests directory.
|
||||
|
||||
This works similarly to FINAL_TARGET_FILES.
|
||||
|
@ -674,11 +674,11 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
if mozpath.split(base)[0] == 'res':
|
||||
has_resources = True
|
||||
for f in files:
|
||||
path = os.path.join(context.srcdir, f)
|
||||
path = f.full_path
|
||||
if not os.path.exists(path):
|
||||
raise SandboxValidationError(
|
||||
'File listed in %s does not exist: %s'
|
||||
% (var, f), context)
|
||||
% (var, path), context)
|
||||
|
||||
# Addons (when XPI_NAME is defined) and Applications (when
|
||||
# DIST_SUBDIR is defined) use a different preferences directory
|
||||
|
@ -646,8 +646,8 @@ class TestRecursiveMakeBackend(BackendTester):
|
||||
lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
|
||||
|
||||
expected = [
|
||||
'DIST_FILES_0 += install.rdf',
|
||||
'DIST_FILES_0 += main.js',
|
||||
'DIST_FILES_0 += $(srcdir)/install.rdf',
|
||||
'DIST_FILES_0 += $(srcdir)/main.js',
|
||||
'DIST_FILES_0_PATH := $(DEPTH)/dist/bin/',
|
||||
'PP_TARGETS += DIST_FILES_0',
|
||||
]
|
||||
|
@ -826,7 +826,7 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
|
||||
expected = {'install.rdf', 'main.js'}
|
||||
for f in files:
|
||||
self.assertTrue(f in expected)
|
||||
self.assertTrue(unicode(f) in expected)
|
||||
|
||||
def test_missing_final_target_pp_files(self):
|
||||
"""Test that FINAL_TARGET_PP_FILES with missing files throws errors."""
|
||||
|
Loading…
Reference in New Issue
Block a user