Build a target.

    Arguments
    target - The target to build.

def build_task(current_target):
    """
    Build a target.

    Arguments
    target - The target to build.
    """

    target = current_target.config
    try:
        builder = _make_builder(target, current_target)
        build_path = _get_build_path(target, builder)
        if not os.path.exists(build_path):
            os.makedirs(build_path)
        builder.configure(src_dir=target.get("dp.src_dir"), build_dir=build_path)
        builder.build(build_dir=build_path)
        no_install = devpipeline_core.toolsupport.choose_tool_key(
            current_target, _NO_INSTALL_KEYS
        )
        if no_install not in target:
            install_path = target.get(
                devpipeline_core.toolsupport.choose_tool_key(
                    current_target, _INSTALL_PATH_KEYS
                ),
                fallback="install",
            )
            builder.install(build_dir=build_path, install_dir=install_path)
            _find_file_paths(target, os.path.join(build_path, install_path))
    except devpipeline_core.toolsupport.MissingToolKey as mtk:
        current_target.executor.warning(mtk)