Bug 1223149 - Add basic usage documentation for mach build; r=glandium

Support for displaying docstrings in `mach help` was added relatively
recently. `mach build` was never documented. Let's document it.

There are a gazillion things we could put in the documentation. For now,
mainly focus on targets.

--HG--
extra : commitid : FjtVDISK9Q5
extra : rebase_source : a69ba419e49ca0e4435e87597fdfe34623917a6c
extra : amend_source : 1161bf83569c82340ad1e4e4d21ba7f600753af1
This commit is contained in:
Gregory Szorc 2015-11-10 15:41:08 -08:00
parent e0c7d1252d
commit 0ed3c74543

View File

@ -274,6 +274,26 @@ class Build(MachCommandBase):
help='Verbose output for what commands the build is running.')
def build(self, what=None, disable_extra_make_dependencies=None, jobs=0,
directory=None, verbose=False):
"""Build the source tree.
With no arguments, this will perform a full build.
Positional arguments define targets to build. These can be make targets
or patterns like "<dir>/<target>" to indicate a make target within a
directory.
There are a few special targets that can be used to perform a partial
build faster than what `mach build` would perform:
* binaries - compiles and links all C/C++ sources and produces shared
libraries and executables (binaries).
* faster - builds JavaScript, XUL, CSS, etc files.
"binaries" and "faster" almost fully complement each other. However,
there are build actions not captured by either. If things don't appear to
be rebuilding, perform a vanilla `mach build` to rebuild the world.
"""
import which
from mozbuild.controller.building import BuildMonitor
from mozbuild.util import resolve_target_to_make