summaryrefslogtreecommitdiffstats
path: root/MAKEALL
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-02-03 11:16:55 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-02-04 09:55:04 +0100
commit195310fd7b48e2c1198f216f9b4122d8f63e620e (patch)
treeb457b3f4219fabe223e6f9ef32bd9ad1656277ce /MAKEALL
parent263e454f7fceb399a55c847b967ea3bd89b46373 (diff)
downloadbarebox-195310fd7b48e2c1198f216f9b4122d8f63e620e.tar.gz
MAKEALL: add regex support
this will allow to compile only a subset of defconfig Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'MAKEALL')
-rwxr-xr-xMAKEALL16
1 files changed, 13 insertions, 3 deletions
diff --git a/MAKEALL b/MAKEALL
index c08e484..18ed862 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -56,6 +56,7 @@ usage() {
echo "JOBS -j jobs"
echo "BUILDDIR -O build dir"
echo "LOGDIR -l log dir"
+ echo "REGEX -e regex"
echo ""
}
@@ -152,8 +153,9 @@ do_build_target() {
do_build() {
local arch=$1
+ local regex=$2
- for i in arch/${arch}/configs/*_defconfig
+ find arch/${arch}/configs -name "${regex}_defconfig" | while read i
do
local target=$(basename $i)
@@ -178,7 +180,7 @@ do_build_all() {
return $build_target
}
-while getopts "hc:j:O:l:a:" Option
+while getopts "hc:j:O:l:a:e:" Option
do
case $Option in
a )
@@ -196,6 +198,9 @@ case $Option in
O )
BUILDDIR=${OPTARG}
;;
+ e )
+ REGEX=${OPTARG}
+ ;;
h )
usage
exit 0
@@ -241,6 +246,11 @@ fi
[ -d "${LOGDIR}" ] || mkdir ${LOGDIR} || exit 1
+if [ ! "${REGEX}" ]
+then
+ REGEX="*"
+fi
+
if [ ! "${CONFIG}" ] && [ ! "${CROSS_COMPILE+set}" ]
then
echo "You need to specify a CONFIG or a CROSS_COMPILE"
@@ -262,7 +272,7 @@ fi
if [ $# -eq 0 ]
then
- do_build ${ARCH}
+ do_build ${ARCH} "${REGEX}"
else
do_build_target ${ARCH} $1
fi