Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/rfc] Tweak MAINTAINERS to use SED/TR
@ 2002-05-13 12:08 Andrew Cagney
  2002-05-13 12:11 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-05-13 12:08 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Hello,

The attached hopefully addresses the problems Daniel encountered when 
trying to build all targets.

I'll table it for a few days then, baring comments, commit.

enjoy,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1462 bytes --]

2002-05-13  Andrew Cagney  <ac131313@redhat.com>

	* MAINTAINERS (--enable-gdb-build-warnings): Rewrite script to use
	`tr' and `sed'.  Mention that `broken' targets are not expected to
	build.

Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.172
diff -u -r1.172 MAINTAINERS
--- MAINTAINERS	11 May 2002 14:18:14 -0000	1.172
+++ MAINTAINERS	13 May 2002 18:38:50 -0000
@@ -192,21 +192,33 @@
 the obvious fix rule) to ``maintenance only'' targets.  The change
 shall be sanity checked by compiling with one of the listed targets.
 
-The GAWK segment:
+The bourn shell script:
 
-  awk < "${maintainers}" '
-  $2 ~ /--target=.*/ {
-    targets = gensub (/^.*--target=/, "", 1, $2)
-    warnings = gensub (/[)]*$/, "", 1, $3)
-    split (targets, targ, /,/)
-    for (i in targ) {
-	print targ[i], warnings
-    }
-  }'
+cat MAINTAINERS | tr -s '[\t]' '[ ]' | sed -n '
+/^[ ]*[-a-z0-9\.]*[ ]*[(]*--target=.*/ !d
+s/^.*--target=//
+s/).*$//
+h
+:loop
+  g
+  /^[^ ]*,/ !b end
+  s/,[^ ]*//
+  p
+  g
+  s/^[^,]*,//
+  h
+b loop
+:end
+p
+'
 
-can be used to generate a full list of --target=
---enable-gdb-build-warnings= pairs.
+can be used to generate a complete list of --target=
+--enable-gdb-build-warnings= pairs of the form:
 
+	arc-elf ,-Werror
+	hppa1.1-hp-proelf broken
+
+The ``broken'' targets, while listed, are not expected to build.
 
 
 Host/Native:

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch/rfc] Tweak MAINTAINERS to use SED/TR
  2002-05-13 12:08 [patch/rfc] Tweak MAINTAINERS to use SED/TR Andrew Cagney
@ 2002-05-13 12:11 ` Daniel Jacobowitz
  2002-05-13 14:03   ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-05-13 12:11 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

On Mon, May 13, 2002 at 03:08:58PM -0400, Andrew Cagney wrote:
> Hello,
> 
> The attached hopefully addresses the problems Daniel encountered when 
> trying to build all targets.
> 
> I'll table it for a few days then, baring comments, commit.
> 
> enjoy,
> Andrew

> 2002-05-13  Andrew Cagney  <ac131313@redhat.com>
> 
> 	* MAINTAINERS (--enable-gdb-build-warnings): Rewrite script to use
> 	`tr' and `sed'.  Mention that `broken' targets are not expected to
> 	build.
> 
> Index: MAINTAINERS
> ===================================================================
> RCS file: /cvs/src/src/gdb/MAINTAINERS,v
> retrieving revision 1.172
> diff -u -r1.172 MAINTAINERS
> --- MAINTAINERS	11 May 2002 14:18:14 -0000	1.172
> +++ MAINTAINERS	13 May 2002 18:38:50 -0000
> @@ -192,21 +192,33 @@
>  the obvious fix rule) to ``maintenance only'' targets.  The change
>  shall be sanity checked by compiling with one of the listed targets.
>  
> -The GAWK segment:
> +The bourn shell script:

Bourne, I think.

> -  awk < "${maintainers}" '
> -  $2 ~ /--target=.*/ {
> -    targets = gensub (/^.*--target=/, "", 1, $2)
> -    warnings = gensub (/[)]*$/, "", 1, $3)
> -    split (targets, targ, /,/)
> -    for (i in targ) {
> -	print targ[i], warnings
> -    }
> -  }'
> +cat MAINTAINERS | tr -s '[\t]' '[ ]' | sed -n '
> +/^[ ]*[-a-z0-9\.]*[ ]*[(]*--target=.*/ !d
> +s/^.*--target=//
> +s/).*$//
> +h
> +:loop
> +  g
> +  /^[^ ]*,/ !b end
> +  s/,[^ ]*//
> +  p
> +  g
> +  s/^[^,]*,//
> +  h
> +b loop
> +:end
> +p
> +'

Doesn't work for hppa1.1-hp-proelf; outputs

hppa1.1-hp-proelf broken

>  
> -can be used to generate a full list of --target=
> ---enable-gdb-build-warnings= pairs.
> +can be used to generate a complete list of --target=
> +--enable-gdb-build-warnings= pairs of the form:
>  
> +	arc-elf ,-Werror
> +	hppa1.1-hp-proelf broken
> +
> +The ``broken'' targets, while listed, are not expected to build.

What's arc-elf doing here?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch/rfc] Tweak MAINTAINERS to use SED/TR
  2002-05-13 12:11 ` Daniel Jacobowitz
@ 2002-05-13 14:03   ` Andrew Cagney
  2002-05-13 14:08     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-05-13 14:03 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

>  
>> -The GAWK segment:
>> +The bourn shell script:
> 
> 
> Bourne, I think.

Ta.

> Doesn't work for hppa1.1-hp-proelf; outputs
> 
> hppa1.1-hp-proelf broken

Yes:
 >> +The ``broken'' targets, while listed, are not expected to build.


>>  
>> -can be used to generate a full list of --target=
>> ---enable-gdb-build-warnings= pairs.
>> +can be used to generate a complete list of --target=
>> +--enable-gdb-build-warnings= pairs of the form:
>>  
>> +	arc-elf ,-Werror

...
(I'll add some dots)

>> +	hppa1.1-hp-proelf broken
>> +
>> +The ``broken'' targets, while listed, are not expected to build.
> 
> 
> What's arc-elf doing here?

Happened to be first in the list.

Andrew




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch/rfc] Tweak MAINTAINERS to use SED/TR
  2002-05-13 14:03   ` Andrew Cagney
@ 2002-05-13 14:08     ` Daniel Jacobowitz
  2002-05-28  8:28       ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-05-13 14:08 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

On Mon, May 13, 2002 at 05:03:53PM -0400, Andrew Cagney wrote:
> > 
> >>-The GAWK segment:
> >>+The bourn shell script:
> >
> >
> >Bourne, I think.
> 
> Ta.

As for the rest, I see what you meant to do now.  Looks good.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch/rfc] Tweak MAINTAINERS to use SED/TR
  2002-05-13 14:08     ` Daniel Jacobowitz
@ 2002-05-28  8:28       ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2002-05-28  8:28 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

> On Mon, May 13, 2002 at 05:03:53PM -0400, Andrew Cagney wrote:
> 
>> > 
> 
>> >>-The GAWK segment:
>> >>+The bourn shell script:
> 
>> >
>> >
>> >Bourne, I think.
> 
>> 
>> Ta.
> 
> 
> As for the rest, I see what you meant to do now.  Looks good.

Ok, for reference, this is what I checked in:

Andrew


[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1790 bytes --]

2002-05-28  Andrew Cagney  <ac131313@redhat.com>

	* MAINTAINERS (--enable-gdb-build-warnings): Rewrite script to use
	`tr' and `sed'.  Mention that `broken' targets are not expected to
	build.

Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.177
diff -p -r1.177 MAINTAINERS
*** MAINTAINERS	27 May 2002 01:13:12 -0000	1.177
--- MAINTAINERS	28 May 2002 14:58:24 -0000
*************** All recognized developers can make mecha
*** 190,210 ****
  the obvious fix rule) to ``maintenance only'' targets.  The change
  shall be sanity checked by compiling with one of the listed targets.
  
! The GAWK segment:
  
!   awk < "${maintainers}" '
!   $2 ~ /--target=.*/ {
!     targets = gensub (/^.*--target=/, "", 1, $2)
!     warnings = gensub (/[)]*$/, "", 1, $3)
!     split (targets, targ, /,/)
!     for (i in targ) {
! 	print targ[i], warnings
!     }
!   }'
  
! can be used to generate a full list of --target=
! --enable-gdb-build-warnings= pairs.
  
  
  
  Host/Native:
--- 190,225 ----
  the obvious fix rule) to ``maintenance only'' targets.  The change
  shall be sanity checked by compiling with one of the listed targets.
  
! The Bourne shell script:
  
! cat MAINTAINERS | tr -s '[\t]' '[ ]' | sed -n '
! /^[ ]*[-a-z0-9\.]*[ ]*[(]*--target=.*/ !d
! s/^.*--target=//
! s/).*$//
! h
! :loop
!   g
!   /^[^ ]*,/ !b end
!   s/,[^ ]*//
!   p
!   g
!   s/^[^,]*,//
!   h
! b loop
! :end
! p
! '
  
! can be used to generate a complete list of --target=
! --enable-gdb-build-warnings= pairs of the form:
  
+ 	arc-elf ,-Werror
+ 	...
+ 	hppa1.1-hp-proelf broken
+ 	...
+ 
+ While the ``broken'' targets are included in the listing, the are not
+ expected to build.
  
  
  Host/Native:

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-05-28 15:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-13 12:08 [patch/rfc] Tweak MAINTAINERS to use SED/TR Andrew Cagney
2002-05-13 12:11 ` Daniel Jacobowitz
2002-05-13 14:03   ` Andrew Cagney
2002-05-13 14:08     ` Daniel Jacobowitz
2002-05-28  8:28       ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox