public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
Date: Sat,  3 Dec 2011 08:32:03 +0100	[thread overview]
Message-ID: <1322897523-6663-1-git-send-email-marek.vasut@gmail.com> (raw)

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
---
 MAKEALL |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 95b7cd3..ec5997e 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -16,6 +16,7 @@ usage()
 	  -c CPU,    --cpu CPU         Build all boards with cpu CPU
 	  -v VENDOR, --vendor VENDOR   Build all boards with vendor VENDOR
 	  -s SOC,    --soc SOC         Build all boards with soc SOC
+	  -l,        --list            List all targets to be built
 	  -h,        --help            This help output
 
 	Selections by these options are logically ANDed; if the same option
@@ -47,8 +48,8 @@ usage()
 	exit ${ret}
 }
 
-SHORT_OPTS="ha:c:v:s:"
-LONG_OPTS="help,arch:,cpu:,vendor:,soc:"
+SHORT_OPTS="ha:c:v:s:l"
+LONG_OPTS="help,arch:,cpu:,vendor:,soc:,list"
 
 # 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"
 
 SELECTED=''
+ONLY_LIST=''
 
 while true ; do
 	case "$1" in
@@ -104,6 +106,9 @@ while true ; do
 		fi
 		SELECTED='y'
 		shift 2 ;;
+	-l|--list)
+		ONLY_LIST='y'
+		shift ;;
 	-h|--help)
 		usage ;;
 	--)
@@ -488,6 +493,11 @@ LIST_nds32="$(boards_by_arch nds32)"
 build_target() {
 	target=$1
 
+	if [ "$ONLY_LIST" == 'y' ] ; then
+		echo "$target"
+		return
+	fi
+
 	${MAKE} distclean >/dev/null
 	${MAKE} -s ${target}_config
 
@@ -531,6 +541,7 @@ build_targets() {
 #-----------------------------------------------------------------------
 
 print_stats() {
+	if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
 	echo ""
 	echo "--------------------- SUMMARY ----------------------------"
 	echo "Boards compiled: ${TOTAL_CNT}"
-- 
1.7.7.1

             reply	other threads:[~2011-12-03  7:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-03  7:32 Marek Vasut [this message]
2011-12-03  7:57 ` [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets Mike Frysinger
2011-12-03  8:23   ` Marek Vasut
2011-12-03  9:19     ` Mike Frysinger
2011-12-03  9:36       ` Marek Vasut
2011-12-03 17:03         ` Mike Frysinger
2011-12-04  2:44   ` Qinglin Ye
2011-12-04 11:32     ` Marek Vasut
2011-12-12  5:49       ` Mike Frysinger
2011-12-03 16:06 ` Kumar Gala
2011-12-03 17:02   ` Marek Vasut
2011-12-06 21:14 ` Wolfgang Denk

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=1322897523-6663-1-git-send-email-marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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