Browse Source

Run make with -j $(nproc); Add build_qmake

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.0
falkTX 4 years ago
parent
commit
11ecd566ea
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 47 additions and 11 deletions
  1. +9
    -6
      setup/env.sh
  2. +38
    -5
      setup/functions.sh

+ 9
- 6
setup/env.sh View File

@@ -3,7 +3,11 @@
# ---------------------------------------------------------------------------------------------------------------------
# OS setup

if [ "${MACOS}" -eq 1 ]; then
if [ "${LINUX}" -eq 1 ]; then
CMAKE_SYSTEM_NAME="Linux"
PAWPAW_TARGET="linux"

elif [ "${MACOS}" -eq 1 ]; then
CMAKE_SYSTEM_NAME="Darwin"
if [ "${MACOS_OLD}" -eq 1 ]; then
PAWPAW_TARGET="macos-old"
@@ -19,10 +23,6 @@ elif [ "${WIN32}" -eq 1 ]; then
PAWPAW_TARGET="win32"
fi

elif [ "${LINUX}" -eq 1 ]; then
CMAKE_SYSTEM_NAME="Linux"
PAWPAW_TARGET="linux"

else
echo "Unknown target '${target}'"
exit 4
@@ -111,9 +111,12 @@ TARGET_PKG_CONFIG_PATH="${PAWPAW_PREFIX}/lib/pkgconfig"
# ---------------------------------------------------------------------------------------------------------------------
# other

# "-j 2"
MAKE_ARGS=""

if which nproc > /dev/null; then
MAKE_ARGS+="-j $(nproc)"
fi

if [ "${CROSS_COMPILING}" -eq 1 ]; then
MAKE_ARGS="${MAKE_ARGS} CROSS_COMPILING=true"
fi


+ 38
- 5
setup/functions.sh View File

@@ -153,7 +153,7 @@ function build_autoconf() {

if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}"
make ${MAKE_ARGS} install
make ${MAKE_ARGS} install -j 1
touch .stamp_installed
popd
fi
@@ -186,7 +186,7 @@ function build_conf() {

if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}"
make ${MAKE_ARGS} install
make ${MAKE_ARGS} -j 1 install
touch .stamp_installed
popd
fi
@@ -224,7 +224,7 @@ function build_cmake() {

if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}/build"
make ${MAKE_ARGS} install
make ${MAKE_ARGS} -j 1 install
touch ../.stamp_installed
popd
fi
@@ -252,7 +252,7 @@ function build_make() {

if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}"
make PREFIX="${PAWPAW_PREFIX}" PKG_CONFIG="${TARGET_PKG_CONFIG}" ${MAKE_ARGS} install
make PREFIX="${PAWPAW_PREFIX}" PKG_CONFIG="${TARGET_PKG_CONFIG}" ${MAKE_ARGS} -j 1 install
touch .stamp_installed
popd
fi
@@ -297,6 +297,39 @@ function build_meson() {
_postbuild
}

function build_qmake() {
local name="${1}"
local version="${2}"
local extraconfrules="${3}"

local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"

_prebuild "${name}" "${pkgdir}"

if [ ! -f "${pkgdir}/.stamp_configured" ]; then
pushd "${pkgdir}"
qmake ${extraconfrules}
touch .stamp_configured
popd
fi

if [ ! -f "${pkgdir}/.stamp_built" ]; then
pushd "${pkgdir}"
make ${MAKE_ARGS}
touch .stamp_built
popd
fi

if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}"
make ${MAKE_ARGS} -j 1 install
touch .stamp_installed
popd
fi

_postbuild
}

function build_waf() {
local name="${1}"
local version="${2}"
@@ -370,7 +403,7 @@ function build_host_autoconf() {

if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}"
make install
make ${MAKE_ARGS} install -j 1
touch .stamp_installed
popd
fi


Loading…
Cancel
Save