mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/1] MAKEALL: add regex support
Date: Mon, 4 Feb 2013 09:55:23 +0100	[thread overview]
Message-ID: <20130204085523.GI1906@pengutronix.de> (raw)
In-Reply-To: <1359886615-18302-1-git-send-email-plagnioj@jcrosoft.com>

On Sun, Feb 03, 2013 at 11:16:55AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> this will allow to compile only a subset of defconfig
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Applied, thanks

Sascha

> ---
>  MAKEALL |   16 +++++++++++++---
>  1 file 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
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2013-02-04  8:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-03 10:16 Jean-Christophe PLAGNIOL-VILLARD
2013-02-04  8:55 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130204085523.GI1906@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox