Bug 865445 - Add 'configure' command to mach to rebuild the backend. r=gps
authorBrian O'Keefe <bokeefe@alum.wpi.edu>
Fri, 26 Apr 2013 10:11:00 -0400
changeset 130069 b1b32e6511cdbbe7a933a705416167f69d7ac762
parent 130068 bf1a44d938bf9644b1868b2a5da44cedc2e5d305
child 130070 c5224bbcf40b333d703259965776ebb0ac29c69b
push id1552
push userttaubert@mozilla.com
push dateSat, 27 Apr 2013 15:33:29 +0000
treeherderfx-team@40dafc376794 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs865445
milestone23.0a1
Bug 865445 - Add 'configure' command to mach to rebuild the backend. r=gps
python/mozbuild/mozbuild/mach_commands.py
--- 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},