MAKEALL: Add -l option to only list build targets
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
e015edda7e
commit
7f79c6f2f4
15
MAKEALL
15
MAKEALL
|
@ -16,6 +16,7 @@ usage()
|
||||||
-c CPU, --cpu CPU Build all boards with cpu CPU
|
-c CPU, --cpu CPU Build all boards with cpu CPU
|
||||||
-v VENDOR, --vendor VENDOR Build all boards with vendor VENDOR
|
-v VENDOR, --vendor VENDOR Build all boards with vendor VENDOR
|
||||||
-s SOC, --soc SOC Build all boards with soc SOC
|
-s SOC, --soc SOC Build all boards with soc SOC
|
||||||
|
-l, --list List all targets to be built
|
||||||
-h, --help This help output
|
-h, --help This help output
|
||||||
|
|
||||||
Selections by these options are logically ANDed; if the same option
|
Selections by these options are logically ANDed; if the same option
|
||||||
|
@ -47,8 +48,8 @@ usage()
|
||||||
exit ${ret}
|
exit ${ret}
|
||||||
}
|
}
|
||||||
|
|
||||||
SHORT_OPTS="ha:c:v:s:"
|
SHORT_OPTS="ha:c:v:s:l"
|
||||||
LONG_OPTS="help,arch:,cpu:,vendor:,soc:"
|
LONG_OPTS="help,arch:,cpu:,vendor:,soc:,list"
|
||||||
|
|
||||||
# Option processing based on util-linux-2.13/getopt-parse.bash
|
# Option processing based on util-linux-2.13/getopt-parse.bash
|
||||||
|
|
||||||
|
@ -65,6 +66,7 @@ TEMP=`getopt -o ${SHORT_OPTS} --long ${LONG_OPTS} \
|
||||||
eval set -- "$TEMP"
|
eval set -- "$TEMP"
|
||||||
|
|
||||||
SELECTED=''
|
SELECTED=''
|
||||||
|
ONLY_LIST=''
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -104,6 +106,9 @@ while true ; do
|
||||||
fi
|
fi
|
||||||
SELECTED='y'
|
SELECTED='y'
|
||||||
shift 2 ;;
|
shift 2 ;;
|
||||||
|
-l|--list)
|
||||||
|
ONLY_LIST='y'
|
||||||
|
shift ;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
usage ;;
|
usage ;;
|
||||||
--)
|
--)
|
||||||
|
@ -487,6 +492,11 @@ LIST_nds32="$(boards_by_arch nds32)"
|
||||||
build_target() {
|
build_target() {
|
||||||
target=$1
|
target=$1
|
||||||
|
|
||||||
|
if [ "$ONLY_LIST" == 'y' ] ; then
|
||||||
|
echo "$target"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
${MAKE} distclean >/dev/null
|
${MAKE} distclean >/dev/null
|
||||||
${MAKE} -s ${target}_config
|
${MAKE} -s ${target}_config
|
||||||
|
|
||||||
|
@ -530,6 +540,7 @@ build_targets() {
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
|
|
||||||
print_stats() {
|
print_stats() {
|
||||||
|
if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "--------------------- SUMMARY ----------------------------"
|
echo "--------------------- SUMMARY ----------------------------"
|
||||||
echo "Boards compiled: ${TOTAL_CNT}"
|
echo "Boards compiled: ${TOTAL_CNT}"
|
||||||
|
|
Loading…
Reference in New Issue