Skip to content

[Feature request] make use of nproc #18

@cornfeedhobo

Description

@cornfeedhobo

It would be nice to speed up builds by default.

Maybe something like:

make -j ${NENV_JOBS:-$(nprocs)}

Or something more involved like:

nenv_make_package_tarball(){
    local version="$1"
    local jobs="${NENV_JOBS:-auto}"

    if [ "${jobs}" = "auto" ]; then
        if type -t nproc 2>&1 >/dev/null; then
            jobs=$(($(nproc) - 1))
        else
            jobs=1
        fi
    fi

    echo "Compiling..." >&4 2>&1
    pushd "$TEMP_PATH" >&4
    {
        ./configure --prefix=$PREFIX_PATH $CONFIGURE_OPTS
        make -j $jobs
        make install
    } >&4 2>&1
    popd >&4
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions