parameters: (options, targets)
docstring: The main function for the 'build' command.
docstring_summary: The main function for the 'build' command.
docstring_tokens: The main function for the build command .
function: def BuildMain(options, targets):
    """The main function for the 'build' command."""
    if not targets:
      PrintErrorAndExit('No build target is specified.')
  
    # Add the mozc root directory to PYTHONPATH.
    original_python_path = os.environ.get('PYTHONPATH', '')
    depot_path = MOZC_ROOT
    python_path = os.pathsep.join([original_python_path, depot_path])
    os.environ['PYTHONPATH'] = python_path
  
    if IsWindows():
      BuildOnWindows(targets)
    else:
      BuildWithNinja(options, targets)
  
    # Revert python path.
    os.environ['PYTHONPATH'] = original_python_path
function_tokens: def BuildMain ( options , targets ) : if not targets : PrintErrorAndExit ( 'No build target is specified.' ) # Add the mozc root directory to PYTHONPATH. original_python_path = os . environ . get ( 'PYTHONPATH' , '' ) depot_path = MOZC_ROOT python_path = os . pathsep . join ( [ original_python_path , depot_path ] ) os . environ [ 'PYTHONPATH' ] = python_path if IsWindows ( ) : BuildOnWindows ( targets ) else : BuildWithNinja ( options , targets ) # Revert python path. os . environ [ 'PYTHONPATH' ] = original_python_path