Bug 1560340 - Only add confvars.sh as a dependency to config.status when it exists. r=chmanchester

Differential Revision: https://phabricator.services.mozilla.com/D35447

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2019-06-20 18:43:25 +00:00
parent 0fe505a6fe
commit 1440a9cd78

View File

@ -640,20 +640,22 @@ include('js/sub.configure', when=compile_environment & toolkit)
@depends(check_build_environment, build_project)
@imports('__sandbox__')
@imports('glob')
@imports(_from='os.path', _import='exists')
def config_status_deps(build_env, build_project):
topsrcdir = build_env.topsrcdir
topobjdir = build_env.topobjdir
if not build_env.topobjdir.endswith('js/src'):
extra_deps = [
os.path.join(topsrcdir, build_project, 'confvars.sh'),
os.path.join(topobjdir, '.mozconfig.json'),
]
if not topobjdir.endswith('js/src'):
extra_deps = [os.path.join(topobjdir, '.mozconfig.json')]
else:
# mozconfig changes may impact js configure.
extra_deps = [os.path.join(topobjdir[:-7], '.mozconfig.json')]
confvars = os.path.join(topsrcdir, build_project, 'confvars.sh')
if exists(confvars):
extra_deps.append(confvars)
return list(__sandbox__._all_paths) + extra_deps + [
os.path.join(topsrcdir, 'CLOBBER'),
os.path.join(topsrcdir, 'configure'),