Commit f5023212 authored by Bernd Schubert's avatar Bernd Schubert

all: Allow to set the concurency level on package build

-j 4 is not a good value for recent CPUs. Allow exporting
MAKE_CONCURRENCY=xyz on the command line
parent 17450b76
......@@ -23,14 +23,16 @@ build: build-stamp
build-stamp: $(QUILT_STAMPFN) configure-stamp
dh_testdir
make FHGFS_VERSION='__FHGFS_VERSION__' \
VER='__VER__' \
RELEASE_STR='__RELEASE_STR__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__'
make FHGFS_VERSION='__FHGFS_VERSION__' \
VER='__VER__' \
RELEASE_STR='__RELEASE_STR__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j __MAKE_CONCURRENCY__ \
admon
# only build the gui if we don't have an external jar file
if [ -z "__ADMON_GUI_EXTERNAL_JAR_PATH__" ]; then \
......
......@@ -8,6 +8,7 @@
%define FHGFS_SETUP_PATH %FHGFS_SETUP_PATH%
%define ADMON_GUI_PATH %ADMON_GUI_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -78,6 +79,7 @@ make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j%{MAKE_CONCURRENCY} \
admon
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-admon"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_COMMON_PACKAGE_PATH=${FHGFS_COMMON_PACKAGE_PATH:-`readlink -f ../../fhgfs_common_package`}
......@@ -38,6 +40,7 @@ sed \
-e "s#__ADMON_GUI_EXTERNAL_JAR_PATH__#$ADMON_GUI_EXTERNAL_JAR_PATH#g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
chmod +x debian/rules
......
......@@ -17,6 +17,9 @@ else
BUILDARCH=$arch
fi
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
set -e
......@@ -50,6 +53,7 @@ sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s/%VER%/$VER/g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
-e "s#__ADMON_GUI_EXTERNAL_JAR_PATH__#$ADMON_GUI_EXTERNAL_JAR_PATH#g" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -15,7 +15,7 @@ client_packages="fhgfs_client_module fhgfs_client_opentk_module"
admon_package="fhgfs_admon"
opentk_package="fhgfs_opentk_lib" # deletes the libopentk.so, so needs to be last
default_parallel_builds=4
export CONCURRENCY=${MAKE_CONCURRENCY:-4}
the_usage()
{
......@@ -115,16 +115,18 @@ make_dep_lib()
lib="$1"
parallel_override="$2"
if [ -z "$parallel_override" ]; then
parallel=$default_parallel_builds
if [ -n "$parallel_override" ]; then
make_concurrency=$parallel_override
else
parallel=$parallel_override
make_concurrency=$CONCURRENCY
fi
echo "CONCURRENCY=$CONCURRENCY"
echo ${lib}
pwd
run_cmd "make -C ${lib}/${EXTRA_DIR}/build clean >/dev/null"
run_cmd "make -C ${lib}/${EXTRA_DIR}/build -j$parallel >/dev/null"
run_cmd "make -C ${lib}/${EXTRA_DIR}/build -j $make_concurrency >/dev/null"
}
......
......@@ -52,7 +52,7 @@ install: build
VER='__VER__' \
RELEASE_STR='__RELEASE_STR__' \
KDIR='__KDIR__' \
WITHOUT_OPENTK=1 V=1 -j4 prepare_release
WITHOUT_OPENTK=1 V=1 -j __MAKE_CONCURRENCY__ prepare_release
install -D dist/etc/init.d/__NAME__.init debian/__NAME__.init
install -D -m644 dist/etc/default/__NAME__ debian/__NAME__.default
......
......@@ -4,6 +4,7 @@
%define FHGFS_CLIENT_OPENTK_PATH %FHGFS_CLIENT_OPENTK_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define KDIR %KDIR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -73,7 +74,7 @@ make FHGFS_CLIENT_OPENTK_PATH=%{FHGFS_CLIENT_OPENTK_PATH} \
RELEASE_PATH=${RPM_BUILD_ROOT}/opt/fhgfs/src/client \
FHGFS_VERSION=%{FHGFS_VERSION} \
KDIR="%{KDIR}" \
WITHOUT_OPENTK=1 V=1 -j4 prepare_release
WITHOUT_OPENTK=1 V=1 -j%{MAKE_CONCURRENCY} prepare_release
pwd
mkdir -p ${RPM_BUILD_ROOT}/etc/fhgfs
cp dist/etc/*.conf ${RPM_BUILD_ROOT}/etc/fhgfs/
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-client"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_CLIENT_OPENTK_PATH=${FHGFS_CLIENT_OPENTK_PATH:-"../../fhgfs_client_opentk_module"}
FHGFS_CLIENT_OPENTK_PATH=`readlink -f $FHGFS_CLIENT_OPENTK_PATH` # make absolute
......@@ -36,6 +38,7 @@ sed \
-e "s#__KDIR__#$KDIR#g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
sed \
......
......@@ -7,6 +7,10 @@ source ../../fhgfs-version
BUILDARCH="noarch"
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
set -e
if [ -z "$KDIR" ]; then
......@@ -34,6 +38,7 @@ sed -e "s#%FHGFS_CLIENT_OPENTK_PATH%#$FHGFS_CLIENT_OPENTK_PATH#g" \
-e "s/%VER%/$VER/g" \
-e "s#%KDIR%#$KDIR#g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -44,7 +44,7 @@ install: build
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
KDIR='__KDIR__' \
-j4 \
-j__MAKE_CONCURRENCY__ \
prepare_release
......
......@@ -4,6 +4,7 @@
%define FHGFS_CLIENT_OPENTK_PATH %FHGFS_CLIENT_OPENTK_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define KDIR %KDIR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -73,7 +74,7 @@ make \
FHGFS_VERSION=%{FHGFS_VERSION} \
RELEASE_PATH=${RPM_BUILD_ROOT}/opt/fhgfs/src/client \
KDIR="%{KDIR}" \
-j4 \
-j%{MAKE_CONCURRENCY} \
prepare_release
%files
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-client-opentk-src"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
CHANGELOG="debian/changelog"
......@@ -32,6 +34,7 @@ sed \
-e "s#__KDIR__#$KDIR#g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
chmod +x debian/rules
......
......@@ -7,6 +7,10 @@ source ../../fhgfs-version
BUILDARCH="noarch"
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
if [ -z "$KDIR" ]; then
KVER=`uname -r`
KDIR="/lib/modules/${KVER}/build /usr/src/linux-headers-${KVER}"
......@@ -34,6 +38,7 @@ sed -e "s#%FHGFS_CLIENT_OPENTK_PATH%#$FHGFS_CLIENT_OPENTK_PATH#g" \
-e "s#%KDIR%#$KDIR#g" \
-e "s/%BUILDROOT%/$BUILDROOT/g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -29,7 +29,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
-j __MAKE_CONCURRENCY__
touch build-stamp
......
......@@ -6,6 +6,7 @@
%define FHGFS_COMMON_PACKAGE_PATH %FHGFS_COMMON_PACKAGE_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -66,7 +67,7 @@ make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
-j%{MAKE_CONCURRENCY}
%define debug_package %{nil}
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-helperd"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_COMMON_PACKAGE_PATH=${FHGFS_COMMON_PACKAGE_PATH:-`readlink -f ../../fhgfs_common_package`}
......@@ -33,6 +35,7 @@ sed \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
sed \
......
......@@ -14,6 +14,10 @@ else
BUILDARCH=$arch
fi
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
set -e
pushd ../
......@@ -40,6 +44,7 @@ sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -29,7 +29,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
-j __MAKE_CONCURRENCY__
touch build-stamp
......
......@@ -6,6 +6,7 @@
%define FHGFS_COMMON_PACKAGE_PATH %FHGFS_COMMON_PACKAGE_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -64,7 +65,7 @@ make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
-j %{MAKE_CONCURRENCY}
%define debug_package %{nil}
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-meta"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_COMMON_PACKAGE_PATH=${FHGFS_COMMON_PACKAGE_PATH:-`readlink -f ../../fhgfs_common_package`}
......@@ -33,6 +35,7 @@ sed \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
sed \
......
......@@ -14,6 +14,10 @@ else
BUILDARCH=$arch
fi
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
set -e
pushd ../
......@@ -40,6 +44,7 @@ sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -29,7 +29,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
-j __MAKE_CONCURRENCY__
touch build-stamp
......
......@@ -6,6 +6,7 @@
%define FHGFS_COMMON_PACKAGE_PATH %FHGFS_COMMON_PACKAGE_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -64,7 +65,7 @@ make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
-j -j%{MAKE_CONCURRENCY}
%define debug_package %{nil}
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-mgmtd"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_COMMON_PACKAGE_PATH=${FHGFS_COMMON_PACKAGE_PATH:-`readlink -f ../../fhgfs_common_package`}
......@@ -33,6 +35,7 @@ sed \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
sed \
......
......@@ -14,6 +14,10 @@ else
BUILDARCH=$arch
fi
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
set -e
pushd ../
......@@ -40,6 +44,7 @@ sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -29,7 +29,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
-j __MAKE_CONCURRENCY__
touch build-stamp
......
......@@ -6,6 +6,7 @@
%define FHGFS_COMMON_PACKAGE_PATH %FHGFS_COMMON_PACKAGE_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -64,7 +65,7 @@ make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
-j %{MAKE_CONCURRENCY}
%define debug_package %{nil}
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-storage"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_COMMON_PACKAGE_PATH=${FHGFS_COMMON_PACKAGE_PATH:-`readlink -f ../../fhgfs_common_package`}
......@@ -33,6 +35,7 @@ sed \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
sed \
......
......@@ -14,6 +14,11 @@ else
BUILDARCH=$arch
fi
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
set -e
pushd ../
......@@ -40,6 +45,7 @@ sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -28,7 +28,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
FHGFS_FSCK_PATH='__FHGFS_FSCK_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
-j __MAKE_CONCURRENCY__
touch build-stamp
......
......@@ -7,6 +7,7 @@
%define FHGFS_FSCK_PATH %FHGFS_FSCK_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define MAKE_CONCURRENCY %MAKE_CONCURRENCY%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
......@@ -67,7 +68,7 @@ make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
FHGFS_FSCK_PATH=%{FHGFS_FSCK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
-C build/ -j4
-C build/ -j %{MAKE_CONCURRENCY}
%define debug_package %{nil}
......
......@@ -6,6 +6,8 @@ NAME="fhgfs-utils"
source ../../fhgfs-version
CONCURRENCY=${MAKE_CONCURRENCY:-4}
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
......@@ -35,6 +37,7 @@ sed \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
-e "s/__MAKE_CONCURRENCY__/$CONCURRENCY/g" \
${RULES}.in > ${RULES}
sed \
......
......@@ -14,6 +14,10 @@ else
BUILDARCH=$arch
fi
CONCURRENCY=${MAKE_CONCURRENCY:-4}
export FHGFS_VERSION_PATH=`pwd`/../../fhgfs-version
set -e
pushd ../
......@@ -43,6 +47,7 @@ sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#" \
-e "s/%RELEASE_STR%/$RELEASE_STR/" \
-e "s/%VER%/$VER/" \
-e "s/%BUILDARCH%/$BUILDARCH/" \
-e "s/%MAKE_CONCURRENCY%/$CONCURRENCY/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment