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 distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 include("build/moz.configure/init.configure")
10 # - Gecko-specific options and rules should go in toolkit/moz.configure.
11 # - Firefox-specific options and rules should go in browser/moz.configure.
12 # - Fennec-specific options and rules should go in
13 # mobile/android/moz.configure.
14 # - Spidermonkey-specific options and rules should go in js/moz.configure.
18 "--enable-artifact-builds",
19 env="MOZ_ARTIFACT_BUILDS",
20 help="Download and use prebuilt binary artifacts.",
24 @depends("--enable-artifact-builds")
25 def artifact_builds(value):
30 set_config("MOZ_ARTIFACT_BUILDS", artifact_builds)
33 "--enable-artifact-build-symbols",
34 depends(artifact_builds)(lambda v: False if v is None else None),
35 reason="--disable-artifact-builds",
39 "--enable-artifact-build-symbols",
42 help="Download symbols when artifact builds are enabled.",
46 @depends("--enable-artifact-build-symbols", "MOZ_AUTOMATION", target)
47 def enable_artifact_build_symbols(value, automation, target):
51 if target.os == "Android" and not automation:
57 set_config("MOZ_ARTIFACT_BUILD_SYMBOLS", enable_artifact_build_symbols)
60 @depends("--enable-artifact-builds")
61 def imply_disable_compile_environment(value):
68 help="For builds that do not support symbols in the normal fashion,"
69 " generate and copy them into the resulting build archive.",
72 set_config("MOZ_COPY_PDBS", depends_if("MOZ_COPY_PDBS")(lambda _: True))
74 imply_option("--enable-compile-environment", imply_disable_compile_environment)
76 option("--disable-compile-environment", help="Disable compiler/library checks")
79 @depends("--disable-compile-environment")
80 def compile_environment(compile_env):
85 set_config("COMPILE_ENVIRONMENT", compile_environment)
86 add_old_configure_assignment("COMPILE_ENVIRONMENT", compile_environment)
88 option("--disable-tests", help="Do not build test libraries & programs")
91 @depends("--disable-tests")
92 def enable_tests(value):
97 set_config("ENABLE_TESTS", enable_tests)
98 set_define("ENABLE_TESTS", enable_tests)
101 @depends(enable_tests)
102 def gtest_has_rtti(value):
107 set_define("GTEST_HAS_RTTI", gtest_has_rtti)
110 @depends(target, enable_tests)
111 def linux_gtest_defines(target, enable_tests):
112 if enable_tests and target.os == "Android":
113 return namespace(os_linux_android=True, use_own_tr1_tuple=True, has_clone="0")
116 set_define("GTEST_OS_LINUX_ANDROID", linux_gtest_defines.os_linux_android)
117 set_define("GTEST_USE_OWN_TR1_TUPLE", linux_gtest_defines.use_own_tr1_tuple)
118 set_define("GTEST_HAS_CLONE", linux_gtest_defines.has_clone)
123 help="Enable building with developer debug info "
124 "(using the given compiler flags).",
128 @depends("--enable-debug")
129 def moz_debug(debug):
134 set_config("MOZ_DEBUG", moz_debug)
135 set_define("MOZ_DEBUG", moz_debug)
136 # Override any value MOZ_DEBUG may have from the environment when passing it
137 # down to old-configure.
138 add_old_configure_assignment("MOZ_DEBUG", depends("--enable-debug")(lambda x: bool(x)))
141 "--with-debug-label",
143 help="Debug DEBUG_<value> for each comma-separated value given",
147 @depends(moz_debug, "--with-debug-label")
148 def debug_defines(debug, labels):
150 return ["DEBUG"] + ["DEBUG_%s" % label for label in labels]
151 return ["NDEBUG", "TRIMMED"]
154 set_config("MOZ_DEBUG_DEFINES", debug_defines)
156 option(env="MOZ_PGO", help="Build with profile guided optimizations")
158 set_config("MOZ_PGO", depends("MOZ_PGO")(lambda x: bool(x)))
161 imply_option("--enable-release", mozilla_official)
162 imply_option("--enable-release", depends_if("MOZ_AUTOMATION")(lambda x: True))
166 default=milestone.is_release_or_beta,
167 help="{Build|Do not build} with more conservative, release "
168 "engineering-oriented options.{ This may slow down builds.|}",
172 @depends("--enable-release")
173 def developer_options(value):
178 add_old_configure_assignment("DEVELOPER_OPTIONS", developer_options)
179 set_config("DEVELOPER_OPTIONS", developer_options)
182 # hybrid build handling
183 # ==============================================================
186 "--disable-unified-build",
187 help="Enable building modules that are not marked with `REQUIRES_UNIFIED_BUILD` in non unified context",
190 set_config("ENABLE_UNIFIED_BUILD", True, when="--disable-unified-build")
193 include("build/moz.configure/bootstrap.configure")
195 # The execution model of the configure sandbox doesn't allow for
196 # check_prog to use bootstrap_search_path directly because check_prog
197 # comes first, so we use a trick to allow it. Uses of check_prog
198 # happening before here won't allow bootstrap.
200 def check_prog(*args, **kwargs):
201 kwargs["bootstrap_search_path"] = bootstrap_search_path
202 return check_prog(*args, **kwargs)
205 check_prog("WGET", ("wget",), allow_missing=True)
208 include("build/moz.configure/toolchain.configure", when="--enable-compile-environment")
210 include("build/moz.configure/pkg.configure")
211 # Make this assignment here rather than in pkg.configure to avoid
212 # requiring this file in unit tests.
213 add_old_configure_assignment("PKG_CONFIG", pkg_config)
215 include("build/moz.configure/memory.configure", when="--enable-compile-environment")
216 include("build/moz.configure/headers.configure", when="--enable-compile-environment")
217 include("build/moz.configure/warnings.configure", when="--enable-compile-environment")
218 include("build/moz.configure/flags.configure", when="--enable-compile-environment")
219 include("build/moz.configure/lto-pgo.configure", when="--enable-compile-environment")
220 # rust.configure is included by js/moz.configure.
222 option("--enable-valgrind", help="Enable Valgrind integration hooks")
224 valgrind_h = check_header("valgrind/valgrind.h", when="--enable-valgrind")
227 @depends("--enable-valgrind", valgrind_h)
228 def check_valgrind(valgrind, valgrind_h):
231 die("--enable-valgrind specified but Valgrind is not installed")
235 set_define("MOZ_VALGRIND", check_valgrind)
236 set_config("MOZ_VALGRIND", check_valgrind)
239 @depends(target, host)
240 def is_openbsd(target, host):
241 return target.kernel == "OpenBSD" or host.kernel == "OpenBSD"
249 help="Shared library version for OpenBSD systems",
253 @depends("SO_VERSION", when=is_openbsd)
254 def so_version(value):
259 def library_name_info_template(host_or_target):
260 assert host_or_target in {host, target}
262 host: host_c_compiler,
266 @depends(host_or_target, compiler, so_version)
267 def library_name_info_impl(host_or_target, compiler, so_version):
268 if host_or_target.kernel == "WINNT":
269 # There aren't artifacts for mingw builds, so it's OK that the
270 # results are inaccurate in that case.
271 if compiler and compiler.type != "clang-cl":
273 dll=namespace(prefix="", suffix=".dll"),
274 lib=namespace(prefix="lib", suffix="a"),
275 import_lib=namespace(prefix="lib", suffix="a"),
276 obj=namespace(prefix="", suffix="o"),
280 dll=namespace(prefix="", suffix=".dll"),
281 lib=namespace(prefix="", suffix="lib"),
282 import_lib=namespace(prefix="", suffix="lib"),
283 obj=namespace(prefix="", suffix="obj"),
286 elif host_or_target.kernel == "Darwin":
288 dll=namespace(prefix="lib", suffix=".dylib"),
289 lib=namespace(prefix="lib", suffix="a"),
290 import_lib=namespace(prefix=None, suffix=""),
291 obj=namespace(prefix="", suffix="o"),
294 so = ".so.%s" % so_version
299 dll=namespace(prefix="lib", suffix=so),
300 lib=namespace(prefix="lib", suffix="a"),
301 import_lib=namespace(prefix=None, suffix=""),
302 obj=namespace(prefix="", suffix="o"),
305 return library_name_info_impl
308 host_library_name_info = library_name_info_template(host)
309 library_name_info = library_name_info_template(target)
311 set_config("DLL_PREFIX", library_name_info.dll.prefix)
312 set_config("DLL_SUFFIX", library_name_info.dll.suffix)
313 set_config("HOST_DLL_PREFIX", host_library_name_info.dll.prefix)
314 set_config("HOST_DLL_SUFFIX", host_library_name_info.dll.suffix)
315 set_config("LIB_PREFIX", library_name_info.lib.prefix)
316 set_config("LIB_SUFFIX", library_name_info.lib.suffix)
317 set_config("OBJ_SUFFIX", library_name_info.obj.suffix)
318 # Lots of compilation tests depend on this variable being present.
319 add_old_configure_assignment("OBJ_SUFFIX", library_name_info.obj.suffix)
320 set_config("IMPORT_LIB_SUFFIX", library_name_info.import_lib.suffix)
322 "MOZ_DLL_PREFIX", depends(library_name_info.dll.prefix)(lambda s: '"%s"' % s)
325 "MOZ_DLL_SUFFIX", depends(library_name_info.dll.suffix)(lambda s: '"%s"' % s)
327 set_config("WASM_OBJ_SUFFIX", "wasm")
329 # Make `profiling` available to this file even when js/moz.configure
330 # doesn't end up included.
331 profiling = dependable(False)
332 # Same for js_standalone
333 js_standalone = dependable(False)
335 fold_libs = dependable(False)
337 include(include_project_configure)
341 @imports(_from="mozbuild.backend", _import="backends")
342 def build_backends_choices(_):
343 return tuple(backends)
346 @deprecated_option("--enable-build-backend", nargs="+", choices=build_backends_choices)
347 def build_backend(backends):
349 return tuple("+%s" % b for b in backends)
352 imply_option("--build-backends", build_backend)
356 "--enable-artifact-builds",
357 "--disable-compile-environment",
358 "--enable-build-backend",
360 "--enable-application",
364 def build_backend_defaults(
365 artifact_builds, compile_environment, requested_backends, project, application, _
368 project = application[0]
372 if "Tup" in requested_backends:
373 # As a special case, if Tup was requested, do not combine it with any
374 # Make based backend by default.
376 elif artifact_builds:
377 all_backends = ["FasterMake+RecursiveMake"]
379 all_backends = ["RecursiveMake", "FasterMake"]
380 # Normally, we'd use target.os == 'WINNT', but a dependency on target
381 # would require target to depend on --help, as well as host and shell,
382 # and this is not a can of worms we can open at the moment.
384 sys.platform == "win32"
385 and compile_environment
386 and project not in ("mobile/android", "memory", "tools/update-programs")
388 all_backends.append("VisualStudio")
389 return tuple(all_backends) or None
395 default=build_backend_defaults,
396 choices=build_backends_choices,
397 help="Build backends to generate",
401 @depends("--build-backends")
402 def build_backends(backends):
406 set_config("BUILD_BACKENDS", build_backends)
409 @depends(check_build_environment, build_backends)
411 def check_objdir_backend_reuse(build_env, backends):
412 # "Make based" might be RecursiveMake or a hybrid backend, so "Make" is
413 # intentionally vague for use with the substring match below.
414 incompatible_backends = (("Tup", "Make"), ("Make", "Tup"))
415 for backend_file in glob.iglob(
416 os.path.join(build_env.topobjdir, "backend.*Backend")
418 for prev, curr in incompatible_backends:
419 if prev in backend_file and any(curr in b for b in backends):
421 "The active objdir, %s, was previously "
422 "used to build with a %s based backend. "
423 "Change objdirs (by setting MOZ_OBJDIR in "
424 "your mozconfig) or clobber to continue.\n",
430 # Determine whether to build the gtest xul. This happens in automation
431 # on Android and Desktop platforms with the exception of:
432 # - Windows PGO, where linking xul-gtest.dll takes too long;
433 # - Android other than x86_64, where gtest is not required.
439 when="--enable-compile-environment",
441 def build_gtest(build_project, target, automation, enable_tests):
445 and build_project in ("browser", "comm/mail", "mobile/android")
446 and not (target.os == "Android" and target.cpu != "x86_64")
451 "--enable-gtest-in-build",
453 help="{Enable|Force disable} building the gtest libxul during the build.",
454 when="--enable-compile-environment",
457 set_config("LINK_GTEST_DURING_COMPILE", True, when="--enable-gtest-in-build")
460 # ==============================================================
462 "--enable-ui-locale",
464 help="Select the user interface locale (default: en-US)",
467 set_config("MOZ_UI_LOCALE", depends("--enable-ui-locale")(lambda x: x))
471 help="An experiment to use ICU4X instead of ICU4C. See intl/ICU4X.md",
474 set_config("MOZ_ICU4X", True, when="--enable-icu4x")
476 # clang-plugin location
477 # ==============================================================
480 @depends(host_library_name_info, check_build_environment, when="--enable-clang-plugin")
481 def clang_plugin_path(library_name_info, build_env):
482 topobjdir = build_env.topobjdir
483 if topobjdir.endswith("/js/src"):
484 topobjdir = topobjdir[:-7]
485 return os.path.abspath(
491 % (library_name_info.dll.prefix, library_name_info.dll.suffix),
496 set_config("CLANG_PLUGIN", clang_plugin_path)
497 add_old_configure_assignment("CLANG_PLUGIN", clang_plugin_path)
501 # ==============================================================
502 awk = check_prog("AWK", ("gawk", "mawk", "nawk", "awk"))
504 # Until the AWK variable is not necessary in old-configure
508 def awk_for_old_configure(value):
512 add_old_configure_assignment("AWK", awk_for_old_configure)
516 # ==============================================================
517 perl = check_prog("PERL", ("perl5", "perl"))
519 # Until the PERL variable is not necessary in old-configure
523 def perl_for_old_configure(value):
527 add_old_configure_assignment("PERL", perl_for_old_configure)
531 def perl_version_check(min_version):
533 @checking("for minimum required perl version >= %s" % min_version)
534 def get_perl_version(perl):
540 onerror=lambda: die("Failed to get perl version."),
544 @depends(get_perl_version)
545 def check_perl_version(version):
546 if version < min_version:
547 die("Perl %s or higher is required.", min_version)
550 @checking("for full perl installation")
551 @imports("subprocess")
552 def has_full_perl_installation(perl):
553 ret = subprocess.call([perl, "-e", "use Config; exit(!-d $Config{archlib})"])
556 @depends(has_full_perl_installation)
557 def require_full_perl_installation(has_full_perl_installation):
558 if not has_full_perl_installation:
560 "Cannot find Config.pm or $Config{archlib}. "
561 "A full perl installation is required."
565 perl_version_check("5.006")
569 # ==============================================================
570 option(env="MAKE", nargs=1, help="Path to GNU make")
573 @depends("MAKE", host)
574 def possible_makes(make, host):
576 if host.kernel == "WINNT":
577 candidates.append("mingw32-make")
579 candidates.append(make[0])
580 if host.kernel == "WINNT":
581 candidates.extend(("mozmake", "make", "gmake"))
583 candidates.extend(("gmake", "make"))
587 check_prog("GMAKE", possible_makes, bootstrap="mozmake")
590 # ==============================================================
592 option(env="WATCHMAN", nargs=1, help="Path to the watchman program")
595 @depends(host, "WATCHMAN")
596 @checking("for watchman", callback=lambda w: w.path if w else "not found")
597 def watchman(host, prog):
598 # On Windows, `watchman` is only supported on 64-bit hosts.
599 if host.os == "WINNT" and host.cpu != "x86_64":
603 prog = find_program("watchman")
608 # `watchman version` will talk to the Watchman daemon service.
609 # This can hang due to permissions problems. e.g.
610 # https://github.com/facebook/watchman/issues/376. So use
611 # `watchman --version` to prevent a class of failures.
612 out = check_cmd_output(prog, "--version", onerror=lambda: None)
616 return namespace(path=prog, version=Version(out.strip()))
619 @depends_if(watchman)
620 @checking("for watchman version")
621 def watchman_version(w):
625 set_config("WATCHMAN", watchman.path)
628 @depends_all(hg_version, hg_config, watchman)
629 @checking("for watchman Mercurial integration")
631 def watchman_hg(hg_version, hg_config, watchman):
632 if hg_version < Version("3.8"):
633 return "no (Mercurial 3.8+ required)"
636 mode_disabled = False
638 for k in ("extensions.fsmonitor", "extensions.hgext.fsmonitor"):
639 if k in hg_config and hg_config[k] != "!":
642 mode_disabled = hg_config.get("fsmonitor.mode") == "off"
645 return "no (fsmonitor extension not enabled)"
647 return "no (fsmonitor.mode=off disables fsmonitor)"
652 # Miscellaneous programs
653 # ==============================================================
654 check_prog("XARGS", ("xargs",))
658 def extra_programs(target):
659 if target.kernel == "Darwin":
661 DSYMUTIL=("dsymutil", "llvm-dsymutil"),
662 MKFSHFS=("newfs_hfs", "mkfs.hfsplus"),
663 HFS_TOOL=("hfsplus",),
665 if target.os == "GNU" and target.kernel == "Linux":
666 return namespace(RPMBUILD=("rpmbuild",))
669 check_prog("DSYMUTIL", extra_programs.DSYMUTIL, allow_missing=True)
670 check_prog("MKFSHFS", extra_programs.MKFSHFS, allow_missing=True)
671 check_prog("HFS_TOOL", extra_programs.HFS_TOOL, allow_missing=True)
672 check_prog("RPMBUILD", extra_programs.RPMBUILD, allow_missing=True)
678 bootstrap="nsis/bin",
680 when=target_is_windows,
683 # Make sure the version of makensis is up to date.
687 @checking("for NSIS version")
689 def nsis_version(nsis):
690 nsis_min_version = "3.0b1"
693 return die("Failed to get nsis version.")
695 out = check_cmd_output(nsis, "-version", onerror=onerror)
697 m = re.search(r"(?<=v)[0-9]+\.[0-9]+((a|b|rc)[0-9]+)?", out)
700 raise FatalCheckError("Unknown version of makensis")
701 ver = Version(m.group(0))
703 # Versions comparisons don't quite work well with beta versions, so ensure
704 # it works for the non-beta version.
705 if ver < nsis_min_version and (ver >= "3.0a" or ver < "3"):
706 raise FatalCheckError(
707 "To build the installer you must have NSIS"
708 " version %s or greater in your path" % nsis_min_version
714 # And that makensis is 32-bit (but only on Windows).
715 @depends_if(nsis, when=depends(host)(lambda h: h.kernel == "WINNT"))
716 @checking("for 32-bit NSIS")
717 def nsis_binary_type(nsis):
718 bin_type = windows_binary_type(nsis)
719 if bin_type != "win32":
720 raise FatalCheckError("%s is not a 32-bit Windows application" % nsis)
725 # And any flags we have to give to makensis
727 def nsis_flags(host):
728 if host.kernel != "WINNT":
733 set_config("MAKENSISU_FLAGS", nsis_flags)
735 check_prog("7Z", ("7z", "7za"), allow_missing=True, when=target_is_windows)
736 check_prog("UPX", ("upx",), allow_missing=True, when=target_is_windows)
741 @depends(host_c_compiler, c_compiler, bindgen_config_paths)
742 def llvm_tool(host_c_compiler, c_compiler, bindgen_config_paths):
744 for compiler in (host_c_compiler, c_compiler):
745 if compiler and compiler.type == "clang":
746 clang = compiler.compiler
748 elif compiler and compiler.type == "clang-cl":
749 clang = os.path.join(os.path.dirname(compiler.compiler), "clang")
752 if not clang and bindgen_config_paths:
753 clang = bindgen_config_paths.clang_path
756 out = check_cmd_output(
757 clang, "--print-prog-name=%s" % tool, onerror=lambda: None
766 llvm_objdump = check_prog(
768 llvm_tool("llvm-objdump"),
770 when="--enable-compile-environment",
771 paths=clang_search_path,
774 add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
777 @depends(llvm_tool("llvm-readelf"), toolchain_prefix)
778 def readelf(llvm_readelf, toolchain_prefix):
779 commands = [llvm_readelf[0], "readelf"]
780 for prefix in toolchain_prefix or ():
781 commands.insert(1, "%sreadelf" % prefix)
782 return tuple(commands)
785 def validate_readelf(path):
786 # llvm-readelf from llvm < 8 doesn't support the GNU binutils-compatible `-d`
787 # flag. We could try running `$path -d $some_binary` but we might be cross
788 # compiling and not have a binary at hand to run that against. `$path -d` alone
789 # would fail whether the flag is supported or not. So we resort to look for the
790 # option in the `--help` output, which fortunately, s compatible between
791 # llvm-readelf and readelf.
792 retcode, stdout, stderr = get_cmd_output(path, "--help")
793 return retcode == 0 and any(l.startswith(" -d ") for l in stdout.splitlines())
796 @depends("--enable-compile-environment", target, host)
797 def readelf_when(compile_env, target, host):
798 return compile_env and any(
799 x.kernel not in ("Darwin", "WINNT") for x in (target, host)
808 paths=clang_search_path,
809 validate=validate_readelf,
812 option("--enable-dtrace", help="Build with dtrace support")
814 dtrace = check_header(
816 when="--enable-dtrace",
817 onerror=lambda: die("dtrace enabled but sys/sdt.h not found"),
820 set_config("HAVE_DTRACE", True, when=dtrace)
821 set_define("INCLUDE_MOZILLA_DTRACE", True, when=dtrace)
822 add_old_configure_assignment("enable_dtrace", "yes", when=dtrace)
825 option("--disable-icf", help="Disable Identical Code Folding")
827 add_old_configure_assignment(
828 "MOZ_DISABLE_ICF", "1", when=depends("--enable-icf")(lambda x: not x)
834 when=compile_environment,
835 help="Enable stripping of libs & executables",
838 # This should be handled as a `when` once bug 1617793 is fixed.
841 @depends("--enable-strip", c_compiler, when=compile_environment)
842 def enable_strip(strip, c_compiler):
843 if strip and c_compiler.type != "clang-cl":
847 set_config("ENABLE_STRIP", enable_strip)
850 "--disable-install-strip",
851 when=compile_environment,
852 help="Enable stripping of libs & executables when packaging",
855 # This should be handled as a `when` once bug 1617793 is fixed.
858 @depends("--enable-install-strip", c_compiler, when=compile_environment)
859 def enable_install_strip(strip, c_compiler):
860 if strip and c_compiler.type != "clang-cl":
864 set_config("PKG_STRIP", enable_install_strip)
867 @depends("--enable-strip", "--enable-install-strip", when=compile_environment)
868 def strip(strip, install_strip):
869 return strip or install_strip
872 option(env="STRIP_FLAGS", nargs=1, when=strip, help="Flags for the strip command")
875 @depends("STRIP_FLAGS", profiling, target, when=strip)
876 def strip_flags(flags, profiling, target):
878 return flags[0].split()
880 # Only strip debug info and symbols when profiling is enabled, keeping
882 if target.kernel == "Darwin":
884 elif target.os == "Android":
885 # The tooling we use with Android supports detached symbols, and the
886 # size increase caused by local symbols are too much for mobile. So,
887 # don't restrict the amount of stripping with a flag.
890 return ["--strip-debug"]
891 # Otherwise strip everything we can, which happens without flags on non-Darwin.
892 # On Darwin, it tries to strip things it can't, so we need to limit its scope.
893 elif target.kernel == "Darwin":
897 set_config("STRIP_FLAGS", strip_flags)
900 @depends(js_standalone, target)
901 def system_zlib_default(js_standalone, target):
902 return js_standalone and target.kernel not in ("WINNT", "Darwin")
906 "--with-system-zlib",
908 default=system_zlib_default,
909 help="{Use|Do not use} system libz",
913 @depends("--with-system-zlib")
914 def deprecated_system_zlib_path(value):
917 "--with-system-zlib=PATH is not supported anymore. Please use "
918 "--with-system-zlib and set any necessary pkg-config environment variable."
922 pkg_check_modules("MOZ_ZLIB", "zlib >= 1.2.3", when="--with-system-zlib")
924 set_config("MOZ_SYSTEM_ZLIB", True, when="--with-system-zlib")
925 add_old_configure_assignment("MOZ_SYSTEM_ZLIB", True, when="--with-system-zlib")
928 # Please do not add configure checks from here on.
930 # Fallthrough to autoconf-based configure
931 include("build/moz.configure/old.configure")
934 include("js/sub.configure", when=compile_environment & toolkit)
937 @depends(check_build_environment, build_project)
938 @imports("__sandbox__")
940 @imports(_from="os.path", _import="exists")
941 def config_status_deps(build_env, build_project):
943 topsrcdir = build_env.topsrcdir
944 topobjdir = build_env.topobjdir
946 if not topobjdir.endswith("js/src"):
947 extra_deps = [os.path.join(topobjdir, ".mozconfig.json")]
949 # mozconfig changes may impact js configure.
950 extra_deps = [os.path.join(topobjdir[:-7], ".mozconfig.json")]
952 confvars = os.path.join(topsrcdir, build_project, "confvars.sh")
954 extra_deps.append(confvars)
957 list(__sandbox__._all_paths)
960 os.path.join(topsrcdir, "CLOBBER"),
961 os.path.join(topsrcdir, "configure.in"),
962 os.path.join(topsrcdir, "js", "src", "configure.in"),
963 os.path.join(topsrcdir, "nsprpub", "configure"),
964 os.path.join(topsrcdir, "config", "milestone.txt"),
965 os.path.join(topsrcdir, "browser", "config", "version.txt"),
966 os.path.join(topsrcdir, "browser", "config", "version_display.txt"),
967 os.path.join(topsrcdir, "build", "build_virtualenv_packages.txt"),
968 os.path.join(topsrcdir, "build", "common_virtualenv_packages.txt"),
969 os.path.join(topsrcdir, "build", "mach_virtualenv_packages.txt"),
970 os.path.join(topsrcdir, "python", "mach", "mach", "site.py"),
971 os.path.join(topsrcdir, "aclocal.m4"),
972 os.path.join(topsrcdir, "old-configure.in"),
973 os.path.join(topsrcdir, "js", "src", "aclocal.m4"),
974 os.path.join(topsrcdir, "js", "src", "old-configure.in"),
976 + glob.glob(os.path.join(topsrcdir, "build", "autoconf", "*.m4"))
980 set_config("CONFIG_STATUS_DEPS", config_status_deps)
981 # Please do not add anything after setting config_dep_paths.