MAKEALL: Do a sanity check on user-supplied arguments
Add a check to make sure that the user's arguments actually find a board in boards.cfg. Previously, if a user misspelled an argument the argument would be discarded without warning. For example, running 'MAKEALL -c 85xx' with the intention of compiling all Freescale 85xx boards would instead silently discard the '-c 85xx' argument since the proper cpu name is 'mpc85xx' and then proceed to compile all PowerPC boards (MAKEALL's default). Also fix an unrelated typo. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
This commit is contained in:
committed by
Wolfgang Denk
parent
009884ae35
commit
cd57b0bb8b
8
MAKEALL
8
MAKEALL
@@ -11,7 +11,7 @@
|
|||||||
# line; without any arguments, MAKEALL defaults to building all Power
|
# line; without any arguments, MAKEALL defaults to building all Power
|
||||||
# Architecture systems (i. e. same as for "MAKEALL powerpc").
|
# Architecture systems (i. e. same as for "MAKEALL powerpc").
|
||||||
#
|
#
|
||||||
# With the iontroduction of the board.cfg file, it has become possible
|
# With the introduction of the board.cfg file, it has become possible
|
||||||
# to provide additional selections. We use standard command line
|
# to provide additional selections. We use standard command line
|
||||||
# options for this:
|
# options for this:
|
||||||
#
|
#
|
||||||
@@ -125,6 +125,12 @@ FILTER="\$1 !~ /^#/"
|
|||||||
|
|
||||||
if [ "$SELECTED" ] ; then
|
if [ "$SELECTED" ] ; then
|
||||||
SELECTED=$(awk '('"$FILTER"') { print $1 }' boards.cfg)
|
SELECTED=$(awk '('"$FILTER"') { print $1 }' boards.cfg)
|
||||||
|
|
||||||
|
# Make sure some boards from boards.cfg are actually found
|
||||||
|
if [ -z "$SELECTED" ] ; then
|
||||||
|
echo "Error: No boards selected, invalid arguments"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user