From d803775b3df2ad81dc584ce1d599f08b3ba1c17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 29 Mar 2015 23:53:56 +0200 Subject: [PATCH] xbps-src: Set the MAKEFLAGS environment variable This ensures that packages with custom build functions also use our provided MAKEFLAGS. Without this commit it was necessary to always append the "${makejobs}" variable manually to make. For compatibility reasons that is still possible but should probably be removed in the future by making "makejobs" a local variable. --- common/xbps-src/shutils/common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 9753f83069..2e9535c85c 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -217,7 +217,7 @@ setup_pkg() { [ -z "$pkg" ] && return 1 # Start with a sane environment - unset -v PKG_BUILD_OPTIONS XBPS_CROSS_CFLAGS XBPS_CROSS_CXXFLAGS XBPS_CROSS_CPPFLAGS XBPS_CROSS_LDFLAGS + unset -v MAKEFLAGS PKG_BUILD_OPTIONS XBPS_CROSS_CFLAGS XBPS_CROSS_CXXFLAGS XBPS_CROSS_CPPFLAGS XBPS_CROSS_LDFLAGS unset -v subpackages run_depends build_depends host_build_depends unset_package_funcs @@ -377,6 +377,10 @@ setup_pkg() { fi fi + if [ -n "${makejobs}" ]; then + export MAKEFLAGS="${makejobs}" + fi + export CFLAGS="$XBPS_TARGET_CFLAGS $XBPS_CFLAGS $XBPS_CROSS_CFLAGS $CFLAGS $dbgflags" export CXXFLAGS="$XBPS_TARGET_CXXFLAGS $XBPS_CXXFLAGS $XBPS_CROSS_CXXFLAGS $CXXFLAGS $dbgflags" export CPPFLAGS="$XBPS_TARGET_CPPFLAGS $XBPS_CPPFLAGS $XBPS_CROSS_CPPFLAGS $CPPFLAGS"