1 # Sanitize.in for devo/include/elf.
3 # Each directory to survive it's way into a release will need a file
4 # like this one called "./.Sanitize". All keyword lines must exist,
5 # and must exist in the order specified by this file. Each directory
6 # in the tree will be processed, top down, in the following order.
8 # Hash started lines like this one are comments and will be deleted
9 # before anything else is done. Blank lines will also be squashed
12 # The lines between the "Do-first:" line and the "Things-to-keep:"
13 # line are executed as a /bin/sh shell script before anything else is
18 # All files listed between the "Things-to-keep:" line and the
19 # "Files-to-sed:" line will be kept. All other files will be removed.
20 # Directories listed in this section will have their own Sanitize
21 # called. Directories not listed will be removed in their entirety
45 d30v_files="ChangeLog common.h"
46 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
47 for i in $d30v_files ; do
48 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
49 if [ -n "${verbose}" ] ; then
50 echo Keeping d30v stuff in $i
55 for i in $d30v_files ; do
56 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
57 if [ -n "${verbose}" ] ; then
58 echo Removing traces of \"d30v\" from $i...
61 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
62 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
63 if [ -n "${verbose}" ] ; then
64 echo Caching $i in .Recover...
73 v850_files="ChangeLog common.h v850.h"
74 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
75 for i in $v850_files ; do
76 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
77 if [ -n "${verbose}" ] ; then
78 echo Keeping v850e stuff in $i
83 for i in $v850_files ; do
84 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
85 if [ -n "${verbose}" ] ; then
86 echo Removing traces of \"v850e\" from $i...
89 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
90 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
91 if [ -n "${verbose}" ] ; then
92 echo Caching $i in .Recover...
101 m32rx_files="ChangeLog m32r.h"
102 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
103 for i in $m32rx_files ; do
104 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
105 if [ -n "${verbose}" ] ; then
106 echo Keeping m32rx stuff in $i
111 for i in $m32rx_files ; do
112 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
113 if [ -n "${verbose}" ] ; then
114 echo Removing traces of \"m32rx\" from $i...
117 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
118 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
119 if [ -n "${verbose}" ] ; then
120 echo Caching $i in .Recover...
129 sky_files="ChangeLog mips.h"
130 if ( echo $* | grep keep\-sky > /dev/null ) ; then
131 for i in $sky_files ; do
132 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
133 if [ -n "${verbose}" ] ; then
134 echo Keeping sky stuff in $i
139 for i in $sky_files ; do
140 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
141 if [ -n "${verbose}" ] ; then
142 echo Removing traces of \"sky\" from $i...
145 sed '/start\-sanitize\-sky/,/end\-sanitize\-sky/d' < $i > new
146 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
147 if [ -n "${verbose}" ] ; then
148 echo Caching $i in .Recover...
158 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
159 echo '***' Some mentions of Sanitize are still left in $i! 1>&2