* Makefile.in (INTERNAL_CFLAGS): Add ENABLE_CFLAGS.
[deliverable/binutils-gdb.git] / gdb / config / mips / .Sanitize
index 67b41b878bad02a76b6134bfd03e4ae9bc5a7a45..c4c5bd253e2a1ebc884d7ecc1628c8e4e0a0a4fe 100644 (file)
 
 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.
This page took 0.023868 seconds and 4 git commands to generate.