2016-02-23 03:42:40 +03:00
|
|
|
# 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/.
|
|
|
|
|
2019-07-08 20:34:09 +03:00
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
2016-02-23 03:42:40 +03:00
|
|
|
|
2016-02-25 22:59:53 +03:00
|
|
|
import codecs
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
import errno
|
2020-03-06 05:19:21 +03:00
|
|
|
import io
|
2016-12-02 21:05:57 +03:00
|
|
|
import itertools
|
2019-01-17 02:42:12 +03:00
|
|
|
import logging
|
2016-02-23 03:42:40 +03:00
|
|
|
import os
|
|
|
|
import sys
|
2016-08-18 12:27:39 +03:00
|
|
|
import textwrap
|
2020-03-23 19:33:07 +03:00
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
from collections.abc import Iterable
|
|
|
|
except ImportError:
|
|
|
|
from collections import Iterable
|
2016-08-19 05:11:57 +03:00
|
|
|
|
2016-02-25 22:59:53 +03:00
|
|
|
|
|
|
|
base_dir = os.path.abspath(os.path.dirname(__file__))
|
2020-10-24 03:36:18 +03:00
|
|
|
sys.path.insert(0, os.path.join(base_dir, "python", "mozboot"))
|
|
|
|
sys.path.insert(0, os.path.join(base_dir, "python", "mozbuild"))
|
|
|
|
sys.path.insert(0, os.path.join(base_dir, "third_party", "python", "six"))
|
2019-02-15 16:52:47 +03:00
|
|
|
from mozbuild.configure import (
|
|
|
|
ConfigureSandbox,
|
|
|
|
TRACE,
|
|
|
|
)
|
2016-12-02 21:05:57 +03:00
|
|
|
from mozbuild.pythonutil import iter_modules_in_path
|
2017-08-18 17:41:50 +03:00
|
|
|
from mozbuild.backend.configenvironment import PartialConfigEnvironment
|
2020-10-24 03:36:18 +03:00
|
|
|
from mozbuild.util import write_indented_repr
|
2018-05-22 00:01:50 +03:00
|
|
|
import mozpack.path as mozpath
|
2019-08-21 00:31:34 +03:00
|
|
|
import six
|
2016-02-23 03:42:40 +03:00
|
|
|
|
|
|
|
|
2016-03-04 11:31:10 +03:00
|
|
|
def main(argv):
|
|
|
|
config = {}
|
2019-02-15 16:52:47 +03:00
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
if "OLD_CONFIGURE" not in os.environ:
|
|
|
|
os.environ["OLD_CONFIGURE"] = os.path.join(base_dir, "old-configure")
|
Bug 1671424 - Move configure execution from client.mk to `mach configure`. r=firefox-build-system-reviewers,rstewart
`mach configure` currently runs the equivalent to `make -f client.mk`.
This is history, and essentially does the following:
- Create `configure` and `js/src/configure` from `configure.in` and
`js/src/configure.in` respectively.
- Create the objdir.
- Run `configure` from the objdir.
The `configure` script is, nowadays, only really used as a means to set
OLD_CONFIGURE (and also for people who want to run `configure`,
literally, as in the `configure; make` workflow). `mach configure`
actually doesn't need it. Neither does recursing into `js/src` require
`js/src/configure`, since bug 1520340 (and now as of bug 1669633, we
don't even recurse).
Because configure.py can actually derive OLD_CONFIGURE on its own
(except for `js/src/configure`, but `mach configure` doesn't run that),
we don't really need `configure` for `mach configure`.
So all in all, we're at a point in history where it's straightforward to
just initiate configure.py from mach configure, so we just do that.
And in the hypothetical case where the `mach configure` code is somehow
running in python2, we get the mach virtualenv python3 and use it to
execute `configure.py`.
Differential Revision: https://phabricator.services.mozilla.com/D93741
2020-10-20 23:41:52 +03:00
|
|
|
|
2016-03-04 11:31:10 +03:00
|
|
|
sandbox = ConfigureSandbox(config, os.environ, argv)
|
2019-02-15 16:52:47 +03:00
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
clobber_file = "CLOBBER"
|
2019-11-20 00:49:13 +03:00
|
|
|
if not os.path.exists(clobber_file):
|
|
|
|
# Simply touch the file.
|
2020-10-24 03:36:18 +03:00
|
|
|
with open(clobber_file, "a"):
|
2019-11-20 00:49:13 +03:00
|
|
|
pass
|
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
if os.environ.get("MOZ_CONFIGURE_TRACE"):
|
2019-02-15 16:52:47 +03:00
|
|
|
sandbox._logger.setLevel(TRACE)
|
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
sandbox.run(os.path.join(os.path.dirname(__file__), "moz.configure"))
|
2016-02-25 22:59:53 +03:00
|
|
|
|
2016-03-04 11:31:10 +03:00
|
|
|
if sandbox._help:
|
|
|
|
return 0
|
2016-02-25 22:59:53 +03:00
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
logging.getLogger("moz.configure").info("Creating config.status")
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
old_js_configure_substs = config.pop("OLD_JS_CONFIGURE_SUBSTS", None)
|
|
|
|
old_js_configure_defines = config.pop("OLD_JS_CONFIGURE_DEFINES", None)
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
if old_js_configure_substs or old_js_configure_defines:
|
|
|
|
js_config = config.copy()
|
|
|
|
pwd = os.getcwd()
|
|
|
|
try:
|
|
|
|
try:
|
2020-10-24 03:36:18 +03:00
|
|
|
os.makedirs("js/src")
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
except OSError as e:
|
|
|
|
if e.errno != errno.EEXIST:
|
|
|
|
raise
|
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
os.chdir("js/src")
|
|
|
|
js_config["OLD_CONFIGURE_SUBSTS"] = old_js_configure_substs
|
|
|
|
js_config["OLD_CONFIGURE_DEFINES"] = old_js_configure_defines
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
# The build system frontend expects $objdir/js/src/config.status
|
|
|
|
# to have $objdir/js/src as topobjdir.
|
|
|
|
# We want forward slashes on all platforms.
|
2020-10-24 03:36:18 +03:00
|
|
|
js_config["TOPOBJDIR"] += "/js/src"
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
config_status(js_config, execute=False)
|
|
|
|
finally:
|
|
|
|
os.chdir(pwd)
|
|
|
|
|
2016-03-15 10:41:53 +03:00
|
|
|
return config_status(config)
|
|
|
|
|
|
|
|
|
2019-08-21 00:31:34 +03:00
|
|
|
def check_unicode(obj):
|
2020-10-24 03:36:18 +03:00
|
|
|
"""Recursively check that all strings in the object are unicode strings."""
|
2019-08-21 00:31:34 +03:00
|
|
|
if isinstance(obj, dict):
|
|
|
|
result = True
|
|
|
|
for k, v in six.iteritems(obj):
|
|
|
|
if not check_unicode(k):
|
|
|
|
print("%s key is not unicode." % k, file=sys.stderr)
|
|
|
|
result = False
|
|
|
|
elif not check_unicode(v):
|
|
|
|
print("%s value is not unicode." % k, file=sys.stderr)
|
|
|
|
result = False
|
|
|
|
return result
|
|
|
|
if isinstance(obj, bytes):
|
|
|
|
return False
|
|
|
|
if isinstance(obj, six.text_type):
|
|
|
|
return True
|
|
|
|
if isinstance(obj, Iterable):
|
|
|
|
return all(check_unicode(o) for o in obj)
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
def config_status(config, execute=True):
|
2016-03-04 11:31:10 +03:00
|
|
|
# Sanitize config data to feed config.status
|
2016-03-22 08:03:26 +03:00
|
|
|
# Ideally, all the backend and frontend code would handle the booleans, but
|
|
|
|
# there are so many things involved, that it's easier to keep config.status
|
|
|
|
# untouched for now.
|
2020-04-08 01:08:48 +03:00
|
|
|
def sanitize_config(v):
|
2016-03-22 08:03:26 +03:00
|
|
|
if v is True:
|
2020-10-24 03:36:18 +03:00
|
|
|
return "1"
|
2016-03-22 08:03:26 +03:00
|
|
|
if v is False:
|
2020-10-24 03:36:18 +03:00
|
|
|
return ""
|
2020-04-08 01:08:48 +03:00
|
|
|
# Serialize types that look like lists and tuples as lists.
|
|
|
|
if not isinstance(v, (bytes, six.text_type, dict)) and isinstance(v, Iterable):
|
|
|
|
return list(v)
|
2016-03-22 08:03:26 +03:00
|
|
|
return v
|
|
|
|
|
2016-03-04 11:31:10 +03:00
|
|
|
sanitized_config = {}
|
2020-10-24 03:36:18 +03:00
|
|
|
sanitized_config["substs"] = {
|
|
|
|
k: sanitize_config(v)
|
|
|
|
for k, v in six.iteritems(config)
|
|
|
|
if k
|
|
|
|
not in (
|
|
|
|
"DEFINES",
|
|
|
|
"TOPSRCDIR",
|
|
|
|
"TOPOBJDIR",
|
|
|
|
"CONFIG_STATUS_DEPS",
|
|
|
|
"OLD_CONFIGURE_SUBSTS",
|
|
|
|
"OLD_CONFIGURE_DEFINES",
|
|
|
|
)
|
2016-02-25 22:59:53 +03:00
|
|
|
}
|
2020-10-24 03:36:18 +03:00
|
|
|
for k, v in config["OLD_CONFIGURE_SUBSTS"]:
|
|
|
|
sanitized_config["substs"][k] = sanitize_config(v)
|
|
|
|
sanitized_config["defines"] = {
|
|
|
|
k: sanitize_config(v) for k, v in six.iteritems(config["DEFINES"])
|
2016-03-22 08:03:26 +03:00
|
|
|
}
|
2020-10-24 03:36:18 +03:00
|
|
|
for k, v in config["OLD_CONFIGURE_DEFINES"]:
|
|
|
|
sanitized_config["defines"][k] = sanitize_config(v)
|
|
|
|
sanitized_config["topsrcdir"] = config["TOPSRCDIR"]
|
|
|
|
sanitized_config["topobjdir"] = config["TOPOBJDIR"]
|
|
|
|
sanitized_config["mozconfig"] = config.get("MOZCONFIG")
|
2016-02-25 22:59:53 +03:00
|
|
|
|
2019-08-21 00:31:34 +03:00
|
|
|
if not check_unicode(sanitized_config):
|
|
|
|
print("Configuration should be all unicode.", file=sys.stderr)
|
|
|
|
print("Please file a bug for the above.", file=sys.stderr)
|
|
|
|
sys.exit(1)
|
|
|
|
|
2020-10-07 20:58:21 +03:00
|
|
|
# Some values in sanitized_config also have more complex types, such as
|
|
|
|
# EnumString, which using when calling config_status would currently
|
|
|
|
# break the build, as well as making it inconsistent with re-running
|
|
|
|
# config.status, for which they are normalized to plain strings via
|
|
|
|
# indented_repr. Likewise for non-dict non-string iterables being
|
|
|
|
# converted to lists.
|
|
|
|
def normalize(obj):
|
|
|
|
if isinstance(obj, dict):
|
2020-10-24 03:36:18 +03:00
|
|
|
return {k: normalize(v) for k, v in six.iteritems(obj)}
|
2020-10-07 20:58:21 +03:00
|
|
|
if isinstance(obj, six.text_type):
|
|
|
|
return six.text_type(obj)
|
|
|
|
if isinstance(obj, Iterable):
|
|
|
|
return [normalize(o) for o in obj]
|
|
|
|
return obj
|
|
|
|
|
|
|
|
sanitized_config = normalize(sanitized_config)
|
|
|
|
|
2016-02-25 22:59:53 +03:00
|
|
|
# Create config.status. Eventually, we'll want to just do the work it does
|
|
|
|
# here, when we're able to skip configure tests/use cached results/not rely
|
|
|
|
# on autoconf.
|
2020-10-24 03:36:18 +03:00
|
|
|
with codecs.open("config.status", "w", "utf-8") as fh:
|
|
|
|
fh.write(
|
|
|
|
textwrap.dedent(
|
|
|
|
"""\
|
2016-08-18 12:27:39 +03:00
|
|
|
#!%(python)s
|
2019-08-22 00:26:32 +03:00
|
|
|
# coding=utf-8
|
2016-08-18 12:27:39 +03:00
|
|
|
from __future__ import unicode_literals
|
2020-10-26 21:34:53 +03:00
|
|
|
"""
|
2020-10-24 03:36:18 +03:00
|
|
|
)
|
|
|
|
% {"python": config["PYTHON3"]}
|
|
|
|
)
|
2020-04-22 00:32:30 +03:00
|
|
|
for k, v in sorted(six.iteritems(sanitized_config)):
|
2020-10-24 03:36:18 +03:00
|
|
|
fh.write("%s = " % k)
|
2020-03-25 22:40:06 +03:00
|
|
|
write_indented_repr(fh, v)
|
2020-10-24 03:36:18 +03:00
|
|
|
fh.write(
|
|
|
|
"__all__ = ['topobjdir', 'topsrcdir', 'defines', " "'substs', 'mozconfig']"
|
|
|
|
)
|
2016-02-25 22:59:53 +03:00
|
|
|
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
if execute:
|
2020-10-24 03:36:18 +03:00
|
|
|
fh.write(
|
|
|
|
textwrap.dedent(
|
2020-10-26 21:34:53 +03:00
|
|
|
"""
|
2016-08-18 12:27:39 +03:00
|
|
|
if __name__ == '__main__':
|
2016-12-22 03:28:28 +03:00
|
|
|
from mozbuild.util import patch_main
|
|
|
|
patch_main()
|
2016-08-18 12:27:39 +03:00
|
|
|
from mozbuild.config_status import config_status
|
|
|
|
args = dict([(name, globals()[name]) for name in __all__])
|
|
|
|
config_status(**args)
|
2020-10-26 21:34:53 +03:00
|
|
|
"""
|
2020-10-24 03:36:18 +03:00
|
|
|
)
|
2020-10-26 21:34:53 +03:00
|
|
|
)
|
2016-08-19 05:11:57 +03:00
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
partial_config = PartialConfigEnvironment(config["TOPOBJDIR"])
|
2017-08-18 17:41:50 +03:00
|
|
|
partial_config.write_vars(sanitized_config)
|
|
|
|
|
2018-05-22 00:01:50 +03:00
|
|
|
# Write out a file so the build backend knows to re-run configure when
|
|
|
|
# relevant Python changes.
|
2020-10-24 03:36:18 +03:00
|
|
|
with io.open("config_status_deps.in", "w", encoding="utf-8", newline="\n") as fh:
|
2020-07-02 01:55:52 +03:00
|
|
|
for f in sorted(
|
2020-10-24 03:36:18 +03:00
|
|
|
itertools.chain(
|
|
|
|
config["CONFIG_STATUS_DEPS"],
|
|
|
|
iter_modules_in_path(config["TOPOBJDIR"], config["TOPSRCDIR"]),
|
2020-10-26 21:34:53 +03:00
|
|
|
)
|
2020-10-24 03:36:18 +03:00
|
|
|
):
|
|
|
|
fh.write("%s\n" % mozpath.normpath(f))
|
2016-12-02 21:05:57 +03:00
|
|
|
|
2016-02-25 22:59:53 +03:00
|
|
|
# Other things than us are going to run this file, so we need to give it
|
|
|
|
# executable permissions.
|
2020-10-24 03:36:18 +03:00
|
|
|
os.chmod("config.status", 0o755)
|
Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.
Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.
When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.
Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.
One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.
Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-08 00:13:19 +03:00
|
|
|
if execute:
|
2016-08-19 05:11:57 +03:00
|
|
|
from mozbuild.config_status import config_status
|
2020-10-26 21:34:53 +03:00
|
|
|
|
2020-10-07 20:58:21 +03:00
|
|
|
return config_status(args=[], **sanitized_config)
|
2016-02-25 22:59:53 +03:00
|
|
|
return 0
|
2016-02-23 03:42:40 +03:00
|
|
|
|
2016-03-15 10:41:53 +03:00
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
if __name__ == "__main__":
|
2016-03-04 11:31:10 +03:00
|
|
|
sys.exit(main(sys.argv))
|