[U-Boot] [PATCH] MAKEALL: allow additional board selections
Wolfgang Denk
wd at denx.de
Sun Oct 17 17:00:35 CEST 2010
Dear Mike Frysinger,
In message <201010170713.02380.vapier at gentoo.org> you wrote:
>
> On Sunday, October 17, 2010 06:31:33 Wolfgang Denk wrote:
> > +TEMP=`getopt -o a:c:v:s: --long arch:,cpu:,vendor:,soc: \
> > + -n 'MAKEALL' -- "$@"`
>
> perhaps split the short/long opts out into dedicated variables to make
> updating easier ?
>
> SHORT_OPTS="a:c:v:s:"
> LONG_OPTS="arch:,cpu:,vendor:,soc:"
> ...
> TEMP=`getopt -o ${SHORT_OPTS} --long ${LONG_OPTS} ......
Good idea. Will do.
> > +while true ; do
> > + case "$1" in
> > + -a|--arch)
>
> mixing of spaces & tabs for indentation ...
Ouch. Will fix.
> > + echo "Internal error!" ; exit 1 ;;
>
> send to stderr ?
> echo ... 1>&2
Agree. Will fix.
> > +# echo "Remaining arguments:"
> > +# for arg do echo '--> '"\`$arg'" ; done
>
> the for loop can be done in a single printf:
> printf '--> '"\`%s'\n" "$@"
Yes, but it's only a disabled debug help, and TIMTOWTDI...
I think this doesn;t hurt. Left unchanged.
> > + SELECTED="$(awk '('"$FILTER"') { print $1 }' boards.cfg)"
>
> dont really need the outermost quotes:
> var=$(echo a b c)
> works just fine
Agreed, will fix.
> > -#----- for now, just run PowerPC by default -----
> > -[ $# = 0 ] && set -- powerpc
> > +# Build target groups selected by options, plus any command line args
> > +if [ "$SELECTED" ] ; then
> > + build_targets $SELECTED "$@"
> > +else
> > + # run PowerPC by default
> > + [ $# = 0 ] && set -- powerpc
> >
> > -build_targets "$@"
> > + build_targets "$@"
> > +fi
>
> i dont think you need to be so stringent about the value of SELECTED. this>
> should the same:
> # Build target groups selected by options, plus any command line args
> set -- ${SELECTED} "$@"
> # run PowerPC by default
> [ $# = 0 ] && set -- powerpc
> build_targets "$@"
Agreed, will fix.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The perversity of nature is nowhere better demonstrated by the fact
that, when exposed to the same atmosphere, bread becomes hard while
crackers become soft.
More information about the U-Boot
mailing list