Support tx19 sanitation.
[deliverable/binutils-gdb.git] / gas / config / .Sanitize
index b1716c5c248401c5a5acef193b4d04ed6b0dcfdb..92d7d717252055541b2c7c223610160ccc191702 100644 (file)
@@ -31,22 +31,6 @@ else
        lose_these_too="${d30v_files} ${lose_these_too}"
 fi
 
-v850_files="tc-v850.c tc-v850.h"
-
-if ( echo $* | grep keep\-v850 > /dev/null ) ; then
-       keep_these_too="${v850_files} ${keep_these_too}"
-else
- if ( echo $* | grep keep\-v850e > /dev/null ) ; then
-       keep_these_too="${v850_files} ${keep_these_too}"
- else
-  if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
-       keep_these_too="${v850_files} ${keep_these_too}"
-  else
-       lose_these_too="${v850_files} ${lose_these_too}"
-  fi
- fi
-fi
-
 tic80_files="tc-tic80.c tc-tic80.h"
 
 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
@@ -149,6 +133,8 @@ tc-vax.c
 tc-vax.h
 tc-w65.c
 tc-w65.h
+tc-v850.c
+tc-v850.h
 tc-z8k.c
 tc-z8k.h
 te-386bsd.h
@@ -217,6 +203,35 @@ else
        done
 fi
 
+tx19_files="tc-mips.c"
+
+if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
+       for i in $tx19_files ; do
+               if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping tx19 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in * ; do
+               if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"tx19\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-tx19/,/end\-sanitize\-tx19/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
+
 tic80_files="obj-coff.h"
 
 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
@@ -246,6 +261,38 @@ else
        done
 fi
 
+if [ -n "${verbose}" ] ; then
+       echo Processing \"sh4\"...
+fi
+
+sh4_files="tc-sh.c"
+if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
+       for i in $sh4_files ; do
+               if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping sh4 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $sh4_files ; do
+               if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"sh4\" from $i...
+                       fi
+                       cp $i new
+                       sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $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
+
 v850e_files="tc-v850.c tc-v850.h"
 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
  if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
This page took 0.024143 seconds and 4 git commands to generate.