add sanitization of m32rx PIPE attribute, redact can do this more cleanly
[deliverable/binutils-gdb.git] / opcodes / .Sanitize
index 39ebf43adae3210f85abf4dbdfcb610ab41be1c0..b53c650739315104d4a19476f59baef413fb5b6b 100644 (file)
 
 Do-first:
 
+cygnus_files="cgen.sh cgen-asm.in cgen-dis.in"
+
+if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
+       keep_these_too="${cygnus_files} ${keep_these_too}"
+else
+       lose_these_too="${cygnus_files} ${lose_these_too}"
+fi
+
 d30v_files="d30v-dis.c d30v-opc.c"
 
 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
@@ -31,7 +39,7 @@ else
        lose_these_too="${tic80_files} ${lose_these_too}"
 fi
 
-sky_files="txvu-opc.c txvu-dis.c"
+sky_files="dvp-opc.c dvp-dis.c"
 
 if ( echo $* | grep keep\-sky > /dev/null ) ; then
        keep_these_too="${sky_files} ${keep_these_too}"
@@ -104,6 +112,7 @@ sparc-dis.c
 sparc-opc.c
 stamp-h.in
 sysdep.h
+tic30-dis.c
 w65-dis.c
 w65-opc.h
 v850-opc.c
@@ -116,6 +125,34 @@ Things-to-lose:
 
 Do-last:
 
+cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure"
+if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
+       for i in $cygnus_files ; do
+               if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping cygnus stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $cygnus_files ; do
+               if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"cygnus\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/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
+
 d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
        for i in $d30v_files ; do
@@ -173,7 +210,7 @@ else
 fi
 
 
-r5900_files="ChangeLog mips-opc.c"
+r5900_files="ChangeLog mips-opc.c mips-dis.c"
 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
        for i in $r5900_files ; do
                if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
@@ -229,7 +266,7 @@ else
        done
 fi
 
-tx19_files="ChangeLog mips16-opc.c"
+tx19_files="ChangeLog mips16-opc.c mips-dis.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
@@ -257,7 +294,7 @@ else
        done
 fi
 
-tx49_files="ChangeLog mips-opc.c"
+tx49_files="ChangeLog mips-opc.c mips-dis.c"
 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
        for i in $tx49_files ; do
                if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
@@ -373,7 +410,7 @@ else
        done
 fi
 
-sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
+sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c"
 if ( echo $* | grep keep\-sky > /dev/null ) ; then
        for i in $sky_files ; do
                if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
@@ -401,6 +438,36 @@ else
        done
 fi
 
+m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c"
+if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
+       for i in $m32rx_files ; do
+               if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping m32rx stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $m32rx_files ; do
+               if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"m32rx\" from $i...
+                       fi
+                       cp $i new
+                       # The PIPE sanitization will be much cleaner with redact.
+                       sed -e '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' \
+                               -e 's/, PIPE_[A-Z]*//g' < $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
+
 for i in * ; do
        if test ! -d $i && (grep sanitize $i > /dev/null) ; then
                echo '***' Some mentions of Sanitize are still left in $i! 1>&2
This page took 0.024702 seconds and 4 git commands to generate.