1 # .Sanitize for devo/include.
3 # Each directory to survive its 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
14 # done in this directory.
19 # All files listed between the "Things-to-keep:" line and the
20 # "Files-to-sed:" line will be kept. All other files will be removed.
21 # Directories listed in this section will have their own Sanitize
22 # called. Directories not listed will be removed in their entirety
64 arc_files="ChangeLog dis-asm.h"
65 if ( echo $* | grep keep\-arc > /dev/null ) ; then
66 for i in $arc_files ; do
67 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
68 if [ -n "${verbose}" ] ; then
69 echo Keeping arc stuff in $i
74 for i in $arc_files ; do
75 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
76 if [ -n "${verbose}" ] ; then
77 echo Removing traces of \"arc\" from $i...
80 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
81 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
82 if [ -n "${verbose}" ] ; then
83 echo Caching $i in .Recover...
93 m32r_files="ChangeLog dis-asm.h"
94 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
95 for i in $m32r_files ; do
96 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
97 if [ -n "${verbose}" ] ; then
98 echo Keeping m32r stuff in $i
103 for i in $m32r_files ; do
104 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
105 if [ -n "${verbose}" ] ; then
106 echo Removing traces of \"m32r\" from $i...
109 sed '/start\-sanitize\-m32r/,/end-\sanitize\-m32r/d' < $i > new
110 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
111 if [ -n "${verbose}" ] ; then
112 echo Caching $i in .Recover...
121 v850_files="ChangeLog dis-asm.h"
122 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
123 for i in $v850_files ; do
124 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
125 if [ -n "${verbose}" ] ; then
126 echo Keeping v850 stuff in $i
131 for i in $v850_files ; do
132 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
133 if [ -n "${verbose}" ] ; then
134 echo Removing traces of \"v850\" from $i...
137 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
138 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
139 if [ -n "${verbose}" ] ; then
140 echo Caching $i in .Recover...
149 tic80_files="ChangeLog dis-asm.h"
150 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
151 for i in $tic80_files ; do
152 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
153 if [ -n "${verbose}" ] ; then
154 echo Keeping tic80 stuff in $i
159 for i in $tic80_files ; do
160 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
161 if [ -n "${verbose}" ] ; then
162 echo Removing traces of \"tic80\" from $i...
165 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
166 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
167 if [ -n "${verbose}" ] ; then
168 echo Caching $i in .Recover...
177 d30v_files="ChangeLog dis-asm.h"
178 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
179 for i in $d30v_files ; do
180 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
181 if [ -n "${verbose}" ] ; then
182 echo Keeping d30v stuff in $i
187 for i in $d30v_files ; do
188 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
189 if [ -n "${verbose}" ] ; then
190 echo Removing traces of \"d30v\" from $i...
193 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
194 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
195 if [ -n "${verbose}" ] ; then
196 echo Caching $i in .Recover...
206 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
207 echo '***' Some mentions of Sanitize are still left in $i! 1>&2