[patch/rfc] Obsolete the i960 target
Andrew Cagney
ac131313@ges.redhat.com
Fri Aug 16 06:33:00 GMT 2002
> Hey Andrew,
>
> I'm a little confused on how one deals with target/host-specific files
> when obsoleting a target or host. Sometimes we prefix all lines of
> such a file with // OBSOLETE, sometimes we just leave those files
> alone (like this patch for the i960 target does). I'm tempted to go
> with the latter (since it reduces the amount of work to do). Is that OK?
Ah, I edited ``slightly'' the i960 patch and removed the diffs that just
add the OBSOLETE prefix to every line of a file. The actual files will
be given the OBSOLETE treatment.
Adding the OBSOLETE prefix is very useful (I'd otherwize not be doing it
:-). It stops a search for to specific variables, macros or functions
identifying references in obsolete code. Something like:
#!/bin/sh
find * -name 'ChangeLog*' -prune \
-o -name '*.o' -prune \
-o -name '*.a' -prune \
-o -name '*~' -prune \
-o -name '.#*' -prune \
-o -name 'CVS' -prune \
-o -name 'kernel' -prune \
-o -name 'diff*' -prune \
-o -name '*.orig' -prune \
-o -name '*.rej' -prune \
-o -name 'new-*' -prune \
-o -name '%redact*' -prune \
-o -type f \
-print0 \
| xargs -0 grep "$@" | grep -v OBSOLETE
works really well.
enjoy,
Andrew
PS: It's quicker if the buffer is put into fundamental-mode
More information about the Gdb-patches
mailing list