Bug 1439727 - Add a docstring for `mach clobber`; r=nalexander
authorGregory Szorc <gps@mozilla.com>
Wed, 07 Mar 2018 08:49:13 -0800
changeset 462083 85a7612e5ac9a52620785e3ca45756211fa4963b
parent 462082 f6ea75e2b8e1282856b23fa76302f53a05292501
child 462084 31dc1d9be83d2cc7bc6b86b17f071b865b732e54
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1439727
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1439727 - Add a docstring for `mach clobber`; r=nalexander This makes `mach help clobber` more useful. MozReview-Commit-ID: GsIUqhUzVGP
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -336,16 +336,32 @@ class Clobber(MachCommandBase):
     @Command('clobber', category='build',
         description='Clobber the tree (delete the object directory).')
     @CommandArgument('what', default=['objdir'], nargs='*',
         help='Target to clobber, must be one of {{{}}} (default objdir).'.format(
              ', '.join(CLOBBER_CHOICES)))
     @CommandArgument('--full', action='store_true',
         help='Perform a full clobber')
     def clobber(self, what, full=False):
+        """Clean up the source and object directories.
+
+        Performing builds and running various commands generate various files.
+
+        Sometimes it is necessary to clean up these files in order to make
+        things work again. This command can be used to perform that cleanup.
+
+        By default, this command removes most files in the current object
+        directory (where build output is stored). Some files (like Visual
+        Studio project files) are not removed by default. If you would like
+        to remove the object directory in its entirety, run with `--full`.
+
+        The `python` target will clean up various generated Python files from
+        the source directory. Run this to remove .pyc files, compiled C
+        extensions, etc.
+        """
         invalid = set(what) - set(self.CLOBBER_CHOICES)
         if invalid:
             print('Unknown clobber target(s): {}'.format(', '.join(invalid)))
             return 1
 
         ret = 0
         if 'objdir' in what:
             from mozbuild.controller.clobber import Clobberer