10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-14 01:53:55 +01:00
quantum_package/scripts/build_modules.sh
2015-04-30 14:10:41 +02:00

37 lines
735 B
Bash
Executable File

#!/bin/bash
#
# This script should run from the directory $QPACKAGE_ROOT/src
source ${QPACKAGE_ROOT}/scripts/run_Makefile_global.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}
${QPACKAGE_ROOT}/scripts/run_Makefile_common.sh
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
${QPACKAGE_ROOT}/scripts/create/create_gitignore.sh
cd ${OLDPWD}
done
${QPACKAGE_ROOT}/scripts/create/create_executables_list.sh