Bug 865445 - Add 'configure' command to mach to rebuild the backend. r=gps
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -190,16 +190,32 @@ class Build(MachCommandBase):
# error.
finder_percent = cpu_seconds / elapsed * 100
if finder_percent < 25:
return
print(FINDER_SLOW_MESSAGE % finder_percent)
+ @Command('configure', help='Configure the tree (run configure and config.status')
+ def configure(self):
+ def on_line(line):
+ self.log(logging.INFO, 'build_output', {'line': line}, '{line}')
+
+ status = self._run_make(srcdir=True, filename='client.mk',
+ target='configure', line_handler=on_line, log=False,
+ print_directory=False, allow_parallel=False, ensure_exit_code=False)
+
+ if not status:
+ print('Configure complete!')
+ print('Be sure to run |mach build| to pick up any changes');
+
+ return status
+
+
@Command('clobber', help='Clobber the tree (delete the object directory).')
def clobber(self):
try:
self.remove_objdir()
return 0
except WindowsError as e:
if e.winerror in (5, 32):
self.log(logging.ERROR, 'file_access_error', {'error': e},