--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -126,35 +126,40 @@ def prepare_configure(old_configure, moz
# This could be done with a m4 macro, but it's way easier this way
script = script.replace('>./config.log', '>>./config.log')
with open(old_configure, 'wb') as fh:
fh.write(script)
cmd = [shell, old_configure]
with encoded_open('old-configure.vars', 'w') as out:
+ log.debug('Injecting the following to old-configure:')
+ def inject(command):
+ print(command, file=out)
+ log.debug('| %s', command)
+
if mozconfig['path']:
for key, value in mozconfig['env']['added'].items():
- print("export %s=%s" % (key, quote(value)), file=out)
+ inject("export %s=%s" % (key, quote(value)))
for key, (old, value) in mozconfig['env']['modified'].items():
- print("export %s=%s" % (key, quote(value)), file=out)
+ inject("export %s=%s" % (key, quote(value)))
for key, value in mozconfig['vars']['added'].items():
- print("%s=%s" % (key, quote(value)), file=out)
+ inject("%s=%s" % (key, quote(value)))
for key, (old, value) in mozconfig['vars']['modified'].items():
- print("%s=%s" % (key, quote(value)), file=out)
+ inject("%s=%s" % (key, quote(value)))
for t in ('env', 'vars'):
for key in mozconfig[t]['removed'].keys():
- print("unset %s" % key, file=out)
+ inject("unset %s" % key)
# Autoconf is special, because it might be passed from
# mozconfig['make_extra'], which we don't pass automatically above.
- print('export AUTOCONF=%s' % quote(autoconf), file=out)
+ inject('export AUTOCONF=%s' % quote(autoconf))
for assignment in old_configure_assignments:
- print(assignment, file=out)
+ inject(assignment)
return cmd
@template
def old_configure_options(*options):
for opt in options:
option(opt, nargs='*', help='Help missing for old configure options')
@@ -389,17 +394,17 @@ def old_configure(prepare_configure, ext
# We also pass it the options from js/moz.configure so that it can pass
# them down to js/src/configure. Note this list is empty when running
# js/src/configure, in which case we don't need to pass those options
# to old-configure since old-configure doesn't handle them anyways.
if extra_old_configure_args:
cmd += extra_old_configure_args
# For debugging purpose, in case it's not what we'd expect.
- log.info('running %s', ' '.join(quote(a) for a in cmd))
+ log.debug('Running %s', ' '.join(quote(a) for a in cmd))
# Our logging goes to config.log, the same file old.configure uses.
# We can't share the handle on the file, so close it. We assume nothing
# beyond this point is going to be interesting to log to config.log from
# our end, so we don't make the effort to recreate a logging.FileHandler.
logger = logging.getLogger('moz.configure')
for handler in logger.handlers:
if isinstance(handler, logging.FileHandler):