2015-03-25 23:03:51 +01:00
|
|
|
#!/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
|
2015-05-04 15:54:51 +02:00
|
|
|
${QPACKAGE_ROOT}/scripts/module/create_gitignore.sh
|
2015-03-25 23:03:51 +01:00
|
|
|
cd ${OLDPWD}
|
|
|
|
done
|
2015-05-04 15:54:51 +02:00
|
|
|
${QPACKAGE_ROOT}/scripts/module/create_executables_list.sh
|