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
55 m32rx_files="ChangeLog m32r.h"
56 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
57 for i in $m32rx_files ; do
58 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
59 if [ -n "${verbose}" ] ; then
60 echo Keeping m32rx stuff in $i
65 for i in $m32rx_files ; do
66 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
67 if [ -n "${verbose}" ] ; then
68 echo Removing traces of \"m32rx\" from $i...
71 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
72 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
73 if [ -n "${verbose}" ] ; then
74 echo Caching $i in .Recover...
83 sky_files="ChangeLog mips.h"
84 if ( echo $* | grep keep\-sky > /dev/null ) ; then
85 for i in $sky_files ; do
86 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
87 if [ -n "${verbose}" ] ; then
88 echo Keeping sky stuff in $i
93 for i in $sky_files ; do
94 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
95 if [ -n "${verbose}" ] ; then
96 echo Removing traces of \"sky\" from $i...
99 sed '/start\-sanitize\-sky/,/end\-sanitize\-sky/d' < $i > new
100 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
101 if [ -n "${verbose}" ] ; then
102 echo Caching $i in .Recover...
111 vr4320_files="mips.h"
112 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
113 for i in $vr4320_files ; do
114 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
115 if [ -n "${verbose}" ] ; then
116 echo Keeping vr4320 stuff in $i
121 for i in $vr4320_files ; do
122 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
123 if [ -n "${verbose}" ] ; then
124 echo Removing traces of \"vr4320\" from $i...
127 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
128 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
129 if [ -n "${verbose}" ] ; then
130 echo Caching $i in .Recover...
139 vr4xxx_files="ChangeLog mips.h"
140 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
141 for i in $vr4xxx_files ; do
142 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
143 if [ -n "${verbose}" ] ; then
144 echo Keeping vr4xxx stuff in $i
149 for i in $vr4xxx_files ; do
150 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
151 if [ -n "${verbose}" ] ; then
152 echo Removing traces of \"vr4xxx\" from $i...
155 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
156 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
157 if [ -n "${verbose}" ] ; then
158 echo Caching $i in .Recover...
168 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
169 for i in $tx49_files ; do
170 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
171 if [ -n "${verbose}" ] ; then
172 echo Keeping tx49 stuff in $i
177 for i in $tx49_files ; do
178 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
179 if [ -n "${verbose}" ] ; then
180 echo Removing traces of \"tx49\" from $i...
183 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
184 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
185 if [ -n "${verbose}" ] ; then
186 echo Caching $i in .Recover...
195 cygnus_files="mips.h mn10300.h"
196 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
197 for i in $cygnus_files ; do
198 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
199 if [ -n "${verbose}" ] ; then
200 echo Keeping cygnus stuff in $i
205 for i in $cygnus_files ; do
206 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
207 if [ -n "${verbose}" ] ; then
208 echo Removing traces of \"cygnus\" from $i...
211 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
212 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
213 if [ -n "${verbose}" ] ; then
214 echo Caching $i in .Recover...
223 r5900_files="mips.h ChangeLog"
224 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
225 for i in $r5900_files ; do
226 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
227 if [ -n "${verbose}" ] ; then
228 echo Keeping r5900 stuff in $i
233 for i in $r5900_files ; do
234 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
235 if [ -n "${verbose}" ] ; then
236 echo Removing traces of \"r5900\" from $i...
239 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
240 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
241 if [ -n "${verbose}" ] ; then
242 echo Caching $i in .Recover...
252 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
253 echo '***' Some mentions of Sanitize are still left in $i! 1>&2