aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/mips/.Sanitize
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/config/mips/.Sanitize')
-rw-r--r--gdb/config/mips/.Sanitize41
1 files changed, 27 insertions, 14 deletions
diff --git a/gdb/config/mips/.Sanitize b/gdb/config/mips/.Sanitize
index 67b41b8..c4c5bd2 100644
--- a/gdb/config/mips/.Sanitize
+++ b/gdb/config/mips/.Sanitize
@@ -15,20 +15,6 @@
Do-first:
-gm_files="magic.mt tm-magic.h"
-
-if ( echo $* | grep keep\-gm > /dev/null ) ; then
- keep_these_too="${gm_files} ${keep_these_too}"
- if [ -n "${verbose}" ] ; then
- echo Keeping ${gm_files}
- fi
-else
- lose_these_too="${gm_files} ${lose_these_too}"
- if [ -n "${verbose}" ] ; then
- echo Deleting ${gm_files}
- fi
-fi
-
# All files listed between the "Things-to-keep:" line and the
# "Files-to-sed:" line will be kept. All other files will be removed.
# Directories listed in this section will have their own Sanitize
@@ -97,4 +83,31 @@ Things-to-lose:
Do-last:
+if ( echo $* | grep keep\-gm > /dev/null ) ; then
+ for i in * ; do
+ if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
+ if [ -n "${verbose}" ] ; then
+ echo Keeping gm stuff in $i
+ fi
+ fi
+ done
+else
+ for i in * ; do
+ if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
+ if [ -n "${verbose}" ] ; then
+ echo Removing traces of \"gm\" from $i...
+ fi
+ cp $i new
+ sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
+ if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+ if [ -n "${verbose}" ] ; then
+ echo Caching $i in .Recover...
+ fi
+ mv $i .Recover
+ fi
+ mv new $i
+ fi
+ done
+fi
+
# End of file.