1 # .Sanitize for devo/sim.
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
20 d30v_files="d30v testsuite"
21 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
22 keep_these_too="${d30v_files} ${igen_files} ${keep_these_too}"
25 lose_these_too="${d30v_files} ${lose_these_too}"
29 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
30 keep_these_too="${tic80_files} ${igen_files} ${keep_these_too}"
33 lose_these_too="${tic80_files} ${lose_these_too}"
37 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
38 keep_these_too="${v850_files} ${igen_files} ${keep_these_too}"
41 lose_these_too="${v850_files} ${lose_these_too}"
44 lose_these_too="${igen_files} ${lose_these_too}"
46 # All files listed between the "Things-to-keep:" line and the
47 # "Files-to-sed:" line will be kept. All other files will be removed.
48 # Directories listed in this section will have their own Sanitize
49 # called. Directories not listed will be removed in their entirety
80 d30v_files="configure configure.in ChangeLog"
81 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
82 for i in $d30v_files ; do
83 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
84 if [ -n "${verbose}" ] ; then
85 echo Keeping d30v stuff in $i
90 for i in $d30v_files ; do
91 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
92 if [ -n "${verbose}" ] ; then
93 echo Removing traces of \"d30v\" from $i...
96 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
97 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
98 if [ -n "${verbose}" ] ; then
99 echo Caching $i in .Recover...
108 tic80_files="configure configure.in ChangeLog"
109 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
110 for i in $tic80_files ; do
111 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
112 if [ -n "${verbose}" ] ; then
113 echo Keeping tic80 stuff in $i
118 for i in $tic80_files ; do
119 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
120 if [ -n "${verbose}" ] ; then
121 echo Removing traces of \"tic80\" from $i...
124 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
125 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
126 if [ -n "${verbose}" ] ; then
127 echo Caching $i in .Recover...
136 v850_files="configure configure.in ChangeLog"
137 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
138 for i in $v850_files ; do
139 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
140 if [ -n "${verbose}" ] ; then
141 echo Keeping v850eq stuff in $i
146 for i in $v850_files ; do
147 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
148 if [ -n "${verbose}" ] ; then
149 echo Removing traces of \"v850eq\" from $i...
152 sed '/start\-sanitize\-v850eq/,/end-\sanitize\-v850eq/d' < $i > new
153 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
154 if [ -n "${verbose}" ] ; then
155 echo Caching $i in .Recover...
163 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
164 for i in $v850_files ; do
165 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
166 if [ -n "${verbose}" ] ; then
167 echo Keeping v850e stuff in $i
172 for i in $v850_files ; do
173 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
174 if [ -n "${verbose}" ] ; then
175 echo Removing traces of \"v850e\" from $i...
178 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
179 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
180 if [ -n "${verbose}" ] ; then
181 echo Caching $i in .Recover...
192 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
193 echo '***' Some mentions of Sanitize are still left in $i! 1>&2