* [U-Boot] [PATCH] MAKEALL: allow regex matches for -s option
@ 2013-03-05 21:15 Stephen Warren
2013-03-05 21:37 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2013-03-05 21:15 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
This allows:
MAKEALL -s tegra*
to replace:
MAKEALL -s tegra20 -s tegra30 -s tegra114
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
MAKEALL | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAKEALL b/MAKEALL
index 5b06c54..0ed6986 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -101,9 +101,9 @@ while true ; do
-s|--soc)
# echo "Option SoC: argument \`$2'"
if [ "$opt_s" ] ; then
- opt_s="${opt_s%)} || \$6 == \"$2\")"
+ opt_s="${opt_s%)} || \$6 == \"$2\" || \$6 ~ /$2/)"
else
- opt_s="(\$6 == \"$2\")"
+ opt_s="(\$6 == \"$2\" || \$6 ~ /$2/)"
fi
SELECTED='y'
shift 2 ;;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] MAKEALL: allow regex matches for -s option
2013-03-05 21:15 [U-Boot] [PATCH] MAKEALL: allow regex matches for -s option Stephen Warren
@ 2013-03-05 21:37 ` Wolfgang Denk
2013-03-05 21:43 ` Stephen Warren
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2013-03-05 21:37 UTC (permalink / raw)
To: u-boot
Dear Stephen Warren,
In message <1362518101-5742-1-git-send-email-swarren@wwwdotorg.org> you wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> This allows:
>
> MAKEALL -s tegra*
>
> to replace:
>
> MAKEALL -s tegra20 -s tegra30 -s tegra114
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> MAKEALL | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/MAKEALL b/MAKEALL
> index 5b06c54..0ed6986 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -101,9 +101,9 @@ while true ; do
> -s|--soc)
> # echo "Option SoC: argument \`$2'"
> if [ "$opt_s" ] ; then
> - opt_s="${opt_s%)} || \$6 == \"$2\")"
> + opt_s="${opt_s%)} || \$6 == \"$2\" || \$6 ~ /$2/)"
Is this actually correct? I see 2 x closing parens here, with no
matching open parens?
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
Remember, an int is not always 16 bits. I'm not sure, but if the
80386 is one step closer to Intel's slugfest with the CPU curve that
is aymptotically approaching a real machine, perhaps an int has been
implemented as 32 bits by some Unix vendors...? - Derek Terveer
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] MAKEALL: allow regex matches for -s option
2013-03-05 21:37 ` Wolfgang Denk
@ 2013-03-05 21:43 ` Stephen Warren
2013-03-05 23:08 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2013-03-05 21:43 UTC (permalink / raw)
To: u-boot
On 03/05/2013 02:37 PM, Wolfgang Denk wrote:
> Dear Stephen Warren,
>
> In message <1362518101-5742-1-git-send-email-swarren@wwwdotorg.org> you wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> This allows:
>>
>> MAKEALL -s tegra*
>>
>> to replace:
>>
>> MAKEALL -s tegra20 -s tegra30 -s tegra114
>>
>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>> ---
>> MAKEALL | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/MAKEALL b/MAKEALL
>> index 5b06c54..0ed6986 100755
>> --- a/MAKEALL
>> +++ b/MAKEALL
>> @@ -101,9 +101,9 @@ while true ; do
>> -s|--soc)
>> # echo "Option SoC: argument \`$2'"
>> if [ "$opt_s" ] ; then
>> - opt_s="${opt_s%)} || \$6 == \"$2\")"
>> + opt_s="${opt_s%)} || \$6 == \"$2\" || \$6 ~ /$2/)"
>
> Is this actually correct? I see 2 x closing parens here, with no
> matching open parens?
Yes, it's confusing, but I believe correct (although I didn't actually
test multiple -s options).
What happens is that the else branch sets up an expression with 1
opening and 1 closing parenthesis. The if branch extends this by
stripping the closing parenthesis during expansion of the existing value
"%)", and then adds more to the expression, including a new closing
parenthesis.
It probably breaks if there's a ) specified in the command-line option,
but none of the names in boards.cfg would require that, and fixing it
easily probably requires re-writing the script in some other language.
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] MAKEALL: allow regex matches for -s option
2013-03-05 21:43 ` Stephen Warren
@ 2013-03-05 23:08 ` Tom Rini
2013-03-05 23:39 ` Stephen Warren
0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2013-03-05 23:08 UTC (permalink / raw)
To: u-boot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/05/2013 04:43 PM, Stephen Warren wrote:
> On 03/05/2013 02:37 PM, Wolfgang Denk wrote:
>> Dear Stephen Warren,
>>
>> In message
>> <1362518101-5742-1-git-send-email-swarren@wwwdotorg.org> you
>> wrote:
>>> From: Stephen Warren <swarren@nvidia.com>
>>>
>>> This allows:
>>>
>>> MAKEALL -s tegra*
>>>
>>> to replace:
>>>
>>> MAKEALL -s tegra20 -s tegra30 -s tegra114
>>>
>>> Signed-off-by: Stephen Warren <swarren@nvidia.com> --- MAKEALL
>>> | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/MAKEALL b/MAKEALL index 5b06c54..0ed6986 100755
>>> --- a/MAKEALL +++ b/MAKEALL @@ -101,9 +101,9 @@ while true ;
>>> do -s|--soc) # echo "Option SoC: argument \`$2'" if [ "$opt_s"
>>> ] ; then - opt_s="${opt_s%)} || \$6 == \"$2\")" +
>>> opt_s="${opt_s%)} || \$6 == \"$2\" || \$6 ~ /$2/)"
>>
>> Is this actually correct? I see 2 x closing parens here, with
>> no matching open parens?
>
> Yes, it's confusing, but I believe correct (although I didn't
> actually test multiple -s options).
Can you try MAKEALL -s tegra* -s omap* and see what happens?
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRNnsCAAoJENk4IS6UOR1W+UIP/0P33LEM7KJT51vdmiPvVDof
NSj+ybdkRd5GZIF9hPnWpO7evFp2BfQNk3KhhmuAOcuiVl+ChBoTwybFpwQjB8KD
BVzLK7qcrjmzmbKV4jrkkZTyp3ejSrFJbrz0LNcPY+UmMyWRUSccAMPtVj7VMRrT
bVYeBgki6AyxljQU2Wx8DbWsyavif8+OZTZSDw4bHR0SCYLaAHmA4Uox4p5krsDd
2dkRuSERcFq2LEB+ynvuCbBjzuYDAYgumdKg8i4BK0gHLP6kzIX7bgrHA8AzHibR
+URnMNrkIlu7qzQIJ01x5k3TIOpkjY30FxAbi04ve2EUHPtThq4e0h5ldEjZi+Cd
XqwM8iUpIhjN5Medk7e+iGLxCPMWJhPILh3XpaV/uW3hGsdIQTbgKzxvlFOo/Vbg
SvlAtTPI4l/P+oB4Fln9aT3bYyyLGvp2eBVhCtasOtJvjykl1ZQJLnNDBg/hXURo
18+BZwCdD8wyP/bOmVgO/PUG2WKlNH1+Dv/7wxILuO1KLsU21bsVBlE0J+GZouxd
f6Q9tkSPtikAQFfy9+MXVopjs6RCQn8VMiNQmx9CBVauXux7Al0JelzRo4vN8TiV
dgCtLlq8eHyRnZTSLRX7AJ3iFNmLi0jDZCE1DDGJuQbQ2OrfjFeHMrKix/Y31tH2
TpBV5fMbQAKk99NB6EDX
=+z/Q
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] MAKEALL: allow regex matches for -s option
2013-03-05 23:08 ` Tom Rini
@ 2013-03-05 23:39 ` Stephen Warren
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2013-03-05 23:39 UTC (permalink / raw)
To: u-boot
On 03/05/2013 04:08 PM, Tom Rini wrote:
> On 03/05/2013 04:43 PM, Stephen Warren wrote:
>> On 03/05/2013 02:37 PM, Wolfgang Denk wrote:
>>> Dear Stephen Warren,
>>>
>>> In message
>>> <1362518101-5742-1-git-send-email-swarren@wwwdotorg.org> you
>>> wrote:
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> This allows:
>>>>
>>>> MAKEALL -s tegra*
>>>>
>>>> to replace:
>>>>
>>>> MAKEALL -s tegra20 -s tegra30 -s tegra114
>>>>
>>>> Signed-off-by: Stephen Warren <swarren@nvidia.com> --- MAKEALL
>>>> | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/MAKEALL b/MAKEALL index 5b06c54..0ed6986 100755
>>>> --- a/MAKEALL +++ b/MAKEALL @@ -101,9 +101,9 @@ while true ;
>>>> do -s|--soc) # echo "Option SoC: argument \`$2'" if [ "$opt_s"
>>>> ] ; then - opt_s="${opt_s%)} || \$6 == \"$2\")" +
>>>> opt_s="${opt_s%)} || \$6 == \"$2\" || \$6 ~ /$2/)"
>>>
>>> Is this actually correct? I see 2 x closing parens here, with
>>> no matching open parens?
>
>> Yes, it's confusing, but I believe correct (although I didn't
>> actually test multiple -s options).
>
> Can you try MAKEALL -s tegra* -s omap* and see what happens?
Looks like it works fine:
--------------------- SUMMARY ----------------------------
Boards compiled: 49
Boards with warnings but no errors: 49 ( omap2420h4 nhk8815
nhk8815_onenand omap5912osk omap730p2 omap730p2_cs0boot
omap730p2_cs3boot eco5pk cm_t35 omap3_overo omap3_pandora dig297
igep0020 igep0020_nand igep0030 igep0030_nand igep0032 am3517_evm
mt_ventoux omap3_zoom1 omap3_zoom2 omap3_logic omap3_mvblx am3517_crane
omap3_beagle omap3_evm omap3_evm_quick_mmc omap3_evm_quick_nand
omap3_sdp3430 devkit8000 mcx tricorder twister nokia_rx51 omap4_panda
omap4_sdp4430 omap5_evm harmony seaboard ventana whistler cardhu dalmore
colibri_t20_iris plutux medcom-wide tec paz00 trimslice )
----------------------------------------------------------
the warning is nothing to do with this patch; my toolchain says the
following every time:)
/path/to/arm-cortex_a9-linux-gnueabi-ld: warning: creating a DT_TEXTREL
in object.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-05 23:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05 21:15 [U-Boot] [PATCH] MAKEALL: allow regex matches for -s option Stephen Warren
2013-03-05 21:37 ` Wolfgang Denk
2013-03-05 21:43 ` Stephen Warren
2013-03-05 23:08 ` Tom Rini
2013-03-05 23:39 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox