10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-09 15:43:54 +01:00
quantum_package/scripts/module/build_modules.sh

38 lines
699 B
Bash
Raw Normal View History

#!/bin/bash
#
# This script should run from the directory $QPACKAGE_ROOT/src
2015-06-02 18:17:59 +02:00
# Check is we are in `QPACKAGE_ROOT_SRC` and all the dependency are correct
2015-05-13 15:42:53 +02:00
${QPACKAGE_ROOT}/scripts/module/check_src.sh
NPROC=$(cat /proc/cpuinfo | grep MHz | wc -l)
export IN_MAKE=1
for MODULE in $@
do
if [[ ! -d ${MODULE} ]]
then
error "Module ${MODULE} doesn't exist"
fi
cd ${MODULE}
echo ${MODULE}
if [[ $# -eq 1 ]]
then
env make -j ${NPROC} all
else
env make -j ${NPROC} all &> make.log
if [[ $? -ne 0 ]]
then
cat make.log
error "
Build failed for module $MODULE
"
fi
fi
2015-05-13 15:42:53 +02:00
cd ${OLDPWD}
done
${QPACKAGE_ROOT}/scripts/module/create_executables_list.sh