* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
@ 2011-12-03 7:32 Marek Vasut
2011-12-03 7:57 ` Mike Frysinger
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Marek Vasut @ 2011-12-03 7:32 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 7:32 [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets Marek Vasut
@ 2011-12-03 7:57 ` Mike Frysinger
2011-12-03 8:23 ` Marek Vasut
2011-12-04 2:44 ` Qinglin Ye
2011-12-03 16:06 ` Kumar Gala
2011-12-06 21:14 ` Wolfgang Denk
2 siblings, 2 replies; 12+ messages in thread
From: Mike Frysinger @ 2011-12-03 7:57 UTC (permalink / raw)
To: u-boot
On Saturday 03 December 2011 02:32:03 Marek Vasut wrote:
> + if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
[ "$ONLY_LIST" = "y" ] && return
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111203/01e19b72/attachment.pgp>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 7:57 ` Mike Frysinger
@ 2011-12-03 8:23 ` Marek Vasut
2011-12-03 9:19 ` Mike Frysinger
2011-12-04 2:44 ` Qinglin Ye
1 sibling, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2011-12-03 8:23 UTC (permalink / raw)
To: u-boot
> On Saturday 03 December 2011 02:32:03 Marek Vasut wrote:
> > + if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
>
> [ "$ONLY_LIST" = "y" ] && return
> -mike
I prefer to be explicit.
M
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 8:23 ` Marek Vasut
@ 2011-12-03 9:19 ` Mike Frysinger
2011-12-03 9:36 ` Marek Vasut
0 siblings, 1 reply; 12+ messages in thread
From: Mike Frysinger @ 2011-12-03 9:19 UTC (permalink / raw)
To: u-boot
On Saturday 03 December 2011 03:23:28 Marek Vasut wrote:
> > On Saturday 03 December 2011 02:32:03 Marek Vasut wrote:
> > > + if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
> >
> > [ "$ONLY_LIST" = "y" ] && return
>
> I prefer to be explicit.
my version is "explicit" as well
the point was more that if statements shouldn't be one-liners like that. if
you want to keep it, then unwrap the block.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111203/2d6d2cc1/attachment.pgp>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 9:19 ` Mike Frysinger
@ 2011-12-03 9:36 ` Marek Vasut
2011-12-03 17:03 ` Mike Frysinger
0 siblings, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2011-12-03 9:36 UTC (permalink / raw)
To: u-boot
> On Saturday 03 December 2011 03:23:28 Marek Vasut wrote:
> > > On Saturday 03 December 2011 02:32:03 Marek Vasut wrote:
> > > > + if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
> > >
> > > [ "$ONLY_LIST" = "y" ] && return
> >
> > I prefer to be explicit.
>
> my version is "explicit" as well
>
> the point was more that if statements shouldn't be one-liners like that.
> if you want to keep it, then unwrap the block.
Is there any such rule?
> -mike
Any other comments ?
M
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 7:32 [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets Marek Vasut
2011-12-03 7:57 ` Mike Frysinger
@ 2011-12-03 16:06 ` Kumar Gala
2011-12-03 17:02 ` Marek Vasut
2011-12-06 21:14 ` Wolfgang Denk
2 siblings, 1 reply; 12+ messages in thread
From: Kumar Gala @ 2011-12-03 16:06 UTC (permalink / raw)
To: u-boot
Would be nice if the commit message explained why you're adding this feature.
- k
On Dec 3, 2011, at 1:32 AM, Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
> MAKEALL | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 16:06 ` Kumar Gala
@ 2011-12-03 17:02 ` Marek Vasut
0 siblings, 0 replies; 12+ messages in thread
From: Marek Vasut @ 2011-12-03 17:02 UTC (permalink / raw)
To: u-boot
> Would be nice if the commit message explained why you're adding this
> feature.
I need to dump every possible config_*** for every architecture, so I can set up
a continuous building and error-catching solution. I'll add that, though this
might be useful just for myself.
M
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 9:36 ` Marek Vasut
@ 2011-12-03 17:03 ` Mike Frysinger
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2011-12-03 17:03 UTC (permalink / raw)
To: u-boot
On Saturday 03 December 2011 04:36:32 Marek Vasut wrote:
> > On Saturday 03 December 2011 03:23:28 Marek Vasut wrote:
> > > > On Saturday 03 December 2011 02:32:03 Marek Vasut wrote:
> > > > > + if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
> > > >
> > > > [ "$ONLY_LIST" = "y" ] && return
> > >
> > > I prefer to be explicit.
> >
> > my version is "explicit" as well
> >
> > the point was more that if statements shouldn't be one-liners like that.
> > if you want to keep it, then unwrap the block.
>
> Is there any such rule?
i don't think we have a style guide for shell scripts, but what you're
proposing doesn't show up anywhere in the current tree. and it's ugly :P.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111203/ba2e5bb3/attachment.pgp>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 7:57 ` Mike Frysinger
2011-12-03 8:23 ` Marek Vasut
@ 2011-12-04 2:44 ` Qinglin Ye
2011-12-04 11:32 ` Marek Vasut
1 sibling, 1 reply; 12+ messages in thread
From: Qinglin Ye @ 2011-12-04 2:44 UTC (permalink / raw)
To: u-boot
Should it be an equality operator instead of an assigning one? i.e:
[ "$ONLY_LIST" == "y" ] && return
On Sat, Dec 3, 2011 at 3:57 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Saturday 03 December 2011 02:32:03 Marek Vasut wrote:
>> + ? ? if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
>
> [ "$ONLY_LIST" = "y" ] && return
> -mike
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-04 2:44 ` Qinglin Ye
@ 2011-12-04 11:32 ` Marek Vasut
2011-12-12 5:49 ` Mike Frysinger
0 siblings, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2011-12-04 11:32 UTC (permalink / raw)
To: u-boot
> Should it be an equality operator instead of an assigning one? i.e:
>
> [ "$ONLY_LIST" == "y" ] && return
1) Please don't top post
2) It's the same thing ... = and == in shell scripting.
M
>
> On Sat, Dec 3, 2011 at 3:57 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Saturday 03 December 2011 02:32:03 Marek Vasut wrote:
> >> + if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
> >
> > [ "$ONLY_LIST" = "y" ] && return
> > -mike
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
>
> Thanks.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-03 7:32 [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets Marek Vasut
2011-12-03 7:57 ` Mike Frysinger
2011-12-03 16:06 ` Kumar Gala
@ 2011-12-06 21:14 ` Wolfgang Denk
2 siblings, 0 replies; 12+ messages in thread
From: Wolfgang Denk @ 2011-12-06 21:14 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <1322897523-6663-1-git-send-email-marek.vasut@gmail.com> you wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
> MAKEALL | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
Applied, thanks.
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
What we anticipate seldom occurs; what we least expect generally
happens. - Bengamin Disraeli
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets
2011-12-04 11:32 ` Marek Vasut
@ 2011-12-12 5:49 ` Mike Frysinger
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2011-12-12 5:49 UTC (permalink / raw)
To: u-boot
On Sunday 04 December 2011 06:32:47 Marek Vasut wrote:
> > Should it be an equality operator instead of an assigning one? i.e:
> >
> > [ "$ONLY_LIST" == "y" ] && return
>
> 2) It's the same thing ... = and == in shell scripting.
while this is true for the particular piece of code quoted, in general, this
statement is false. "==" is a bashism (it is not part of POSIX), and it
allows you to do comparisons that the "=" operator does not (such as pattern
matching).
this code uses "=" everywhere with single brackets. any new code should stick
to that form. if you want to use "==", it should be with double brackets, and
probably have a good reason for it.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111212/adf1e143/attachment.pgp>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-12-12 5:49 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-03 7:32 [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets Marek Vasut
2011-12-03 7:57 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox