Backed out changeset e34634758f51 (bug 1671424) for bustages on configure.py . CLOSED TREE

This commit is contained in:
Narcis Beleuzu
2020-10-20 00:16:22 +03:00
parent b0a4fed533
commit 2fc39d922d
6 changed files with 56 additions and 32 deletions

View File

@@ -58,6 +58,10 @@ endif
MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR) MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
# 'configure' scripts generated by autoconf.
CONFIGURES := $(TOPSRCDIR)/configure
CONFIGURES += $(TOPSRCDIR)/js/src/configure
####################################################################### #######################################################################
# Rules # Rules
@@ -82,6 +86,38 @@ build::
$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server $(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
endif endif
####################################
# Configure
$(CONFIGURES): %: %.in
@echo Generating $@
cp -f $< $@
chmod +x $@
CONFIGURE_ENV_ARGS += \
MAKE='$(MAKE)' \
$(NULL)
# configure uses the program name to determine @srcdir@. Calling it without
# $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
# path of $(TOPSRCDIR).
ifeq ($(TOPSRCDIR),$(OBJDIR))
CONFIGURE = ./configure
else
CONFIGURE = $(TOPSRCDIR)/configure
endif
configure:: $(CONFIGURES)
$(call BUILDSTATUS,TIERS configure)
$(call BUILDSTATUS,TIER_START configure)
@echo cd $(OBJDIR);
@echo $(CONFIGURE) $(CONFIGURE_ARGS)
@cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
|| ( echo '*** Fix above errors and then restart with\
"./mach build"' && exit 1 )
@touch $(OBJDIR)/Makefile
$(call BUILDSTATUS,TIER_FINISH configure)
#################################### ####################################
# Build it # Build it
@@ -99,4 +135,5 @@ endif
.NOTPARALLEL: .NOTPARALLEL:
.PHONY: \ .PHONY: \
build build \
configure

View File

@@ -15,5 +15,6 @@
SRCDIR=$(dirname $0) SRCDIR=$(dirname $0)
TOPSRCDIR="$SRCDIR" TOPSRCDIR="$SRCDIR"
PYTHON3="${PYTHON3:-python3}" PYTHON3="${PYTHON3:-python3}"
export OLD_CONFIGURE="$SRCDIR"/old-configure
exec "$PYTHON3" "$TOPSRCDIR/configure.py" "$@" exec "$PYTHON3" "$TOPSRCDIR/configure.py" "$@"

View File

@@ -40,9 +40,6 @@ import six
def main(argv): def main(argv):
config = {} config = {}
if 'OLD_CONFIGURE' not in os.environ:
os.environ['OLD_CONFIGURE'] = os.path.join(base_dir, 'old-configure')
sandbox = ConfigureSandbox(config, os.environ, argv) sandbox = ConfigureSandbox(config, os.environ, argv)
clobber_file = 'CLOBBER' clobber_file = 'CLOBBER'

View File

@@ -762,6 +762,8 @@ def config_status_deps(build_env, build_project):
return list(__sandbox__._all_paths) + extra_deps + [ return list(__sandbox__._all_paths) + extra_deps + [
os.path.join(topsrcdir, 'CLOBBER'), os.path.join(topsrcdir, 'CLOBBER'),
os.path.join(topsrcdir, 'configure'),
os.path.join(topsrcdir, 'js', 'src', 'configure'),
os.path.join(topsrcdir, 'configure.in'), os.path.join(topsrcdir, 'configure.in'),
os.path.join(topsrcdir, 'js', 'src', 'configure.in'), os.path.join(topsrcdir, 'js', 'src', 'configure.in'),
os.path.join(topsrcdir, 'nsprpub', 'configure'), os.path.join(topsrcdir, 'nsprpub', 'configure'),

View File

@@ -671,7 +671,7 @@ class MozbuildObject(ProcessExecutionMixin):
""" """
self._ensure_objdir_exists() self._ensure_objdir_exists()
args = [self._make_path()] args = self._make_path()
if directory: if directory:
args.extend(['-C', directory.replace(os.sep, '/')]) args.extend(['-C', directory.replace(os.sep, '/')])
@@ -795,7 +795,7 @@ class MozbuildObject(ProcessExecutionMixin):
continue continue
result, xcode_lisense_error_tmp = validate_make(make) result, xcode_lisense_error_tmp = validate_make(make)
if result: if result:
return make return [make]
if xcode_lisense_error_tmp: if xcode_lisense_error_tmp:
xcode_lisense_error = True xcode_lisense_error = True

View File

@@ -31,7 +31,6 @@ except Exception:
psutil = None psutil = None
from mach.mixin.logging import LoggingMixin from mach.mixin.logging import LoggingMixin
from mozboot.util import get_mach_virtualenv_binary
import mozfile import mozfile
from mozsystemmonitor.resourcemonitor import SystemResourceMonitor from mozsystemmonitor.resourcemonitor import SystemResourceMonitor
from mozterm.widgets import Footer from mozterm.widgets import Footer
@@ -54,6 +53,9 @@ from ..compilation.warnings import (
WarningsCollector, WarningsCollector,
WarningsDatabase, WarningsDatabase,
) )
from ..shellutil import (
quote as shell_quote,
)
from ..util import ( from ..util import (
FileAvoidWrite, FileAvoidWrite,
mkdir, mkdir,
@@ -1405,34 +1407,19 @@ class BuildDriver(MozbuildObject):
line_handler = line_handler or on_line line_handler = line_handler or on_line
options = ' '.join(shell_quote(o) for o in options or ())
append_env = dict(append_env or {}) append_env = dict(append_env or {})
append_env['MAKE'] = self._make_path() append_env['CONFIGURE_ARGS'] = options
if six.PY3: # Only print build status messages when we have an active
python = sys.executable # monitor.
else: if not buildstatus_messages:
# Try to get the mach virtualenv Python if we can. append_env['NO_BUILDSTATUS_MESSAGES'] = '1'
python = get_mach_virtualenv_binary() status = self._run_client_mk(target='configure',
if not os.path.exists(python):
python = 'python3'
command = [python, os.path.join(self.topsrcdir, 'configure.py')]
if options:
command.extend(options)
if buildstatus_messages:
line_handler('BUILDSTATUS TIERS configure')
line_handler('BUILDSTATUS TIER_START configure')
status = self._run_command_in_objdir(
args=command,
line_handler=line_handler, line_handler=line_handler,
append_env=append_env, append_env=append_env)
)
if buildstatus_messages: if not status:
line_handler('BUILDSTATUS TIER_FINISH configure')
if status:
print('*** Fix above errors and then restart with "./mach build"')
else:
print('Configure complete!') print('Configure complete!')
print('Be sure to run |mach build| to pick up any changes') print('Be sure to run |mach build| to pick up any changes')