f2503995450931430b598e5c50eee52754e22ce8
[platform/upstream/binutils.git] / gas / .Sanitize
1 # .Sanitize for devo/gas.
2
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.
7
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
10 # out.
11
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.
15
16 Do-first:
17
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
22 # with rm -rf.
23
24 Things-to-keep:
25
26 CONTRIBUTORS
27 COPYING
28 ChangeLog
29 ChangeLog.1
30 Makefile.in
31 NEWS
32 README
33 README-vms
34 acconfig.h
35 aclocal.m4
36 app.c
37 as.c
38 as.h
39 atof-generic.c
40 bignum-copy.c
41 bignum.h
42 bit_fix.h
43 cond.c
44 conf-a-gas.com
45 conf.in
46 config
47 config-gas.com
48 configure
49 configure.bat
50 configure.in
51 debug.c
52 doc
53 ecoff.c
54 ecoff.h
55 emul-target.h
56 emul.h
57 expr.c
58 expr.h
59 flonum-copy.c
60 flonum-konst.c
61 flonum-mult.c
62 flonum.h
63 frags.c
64 frags.h
65 gasp.c
66 gdbinit.in
67 hash.c
68 hash.h
69 input-file.c
70 input-file.h
71 input-scrub.c
72 link.cmd
73 listing.c
74 listing.h
75 literal.c
76 mac-as.r
77 macro.c
78 macro.h
79 makefile.vms
80 messages.c
81 mpw-config.in
82 mpw-make.sed
83 obj.h
84 output-file.c
85 output-file.h
86 read.c
87 read.h
88 sb.c
89 sb.h
90 stabs.c
91 struc-symbol.h
92 subsegs.c
93 subsegs.h
94 symbols.c
95 symbols.h
96 tc.h
97 testsuite
98 vmsconf.sh
99 write.c
100 write.h
101
102 Things-to-lose:
103
104 Do-last:
105
106 arc_files="ChangeLog configure.in configure Makefile.in ChangeLog.1"
107 if ( echo $* | grep keep\-arc > /dev/null ) ; then
108         for i in $arc_files ; do
109                 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
110                         if [ -n "${verbose}" ] ; then
111                                 echo Keeping arc stuff in $i
112                         fi
113                 fi
114         done
115 else
116         for i in $arc_files ; do
117                 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
118                         if [ -n "${verbose}" ] ; then
119                                 echo Removing traces of \"arc\" from $i...
120                         fi
121                         cp $i new
122                         sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
123                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
124                                 if [ -n "${verbose}" ] ; then
125                                         echo Caching $i in .Recover...
126                                 fi
127                                 mv $i .Recover
128                         fi
129                         mv new $i
130                 fi
131         done
132 fi
133
134 if ( echo $* | grep keep\-gm > /dev/null ) ; then
135         for i in * ; do
136                 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
137                         if [ -n "${verbose}" ] ; then
138                                 echo Keeping gm stuff in $i
139                         fi
140                 fi
141         done
142 else
143         for i in * ; do
144                 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
145                         if [ -n "${verbose}" ] ; then
146                                 echo Removing traces of \"gm\" from $i...
147                         fi
148                         cp $i new
149                         sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
150                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
151                                 if [ -n "${verbose}" ] ; then
152                                         echo Caching $i in .Recover...
153                                 fi
154                                 mv $i .Recover
155                         fi
156                         mv new $i
157                 fi
158         done
159 fi
160
161
162 d10v_files="ChangeLog configure.in configure Makefile.in"
163 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
164         for i in $d10v_files ; do
165                 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
166                         if [ -n "${verbose}" ] ; then
167                                 echo Keeping d10v stuff in $i
168                         fi
169                 fi
170         done
171 else
172         for i in $d10v_files ; do
173                 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
174                         if [ -n "${verbose}" ] ; then
175                                 echo Removing traces of \"d10v\" from $i...
176                         fi
177                         cp $i new
178                         sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
179                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
180                                 if [ -n "${verbose}" ] ; then
181                                         echo Caching $i in .Recover...
182                                 fi
183                                 mv $i .Recover
184                         fi
185                         mv new $i
186                 fi
187         done
188 fi
189
190 v850_files="ChangeLog configure.in configure Makefile.in write.c"
191 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
192         for i in $v850_files ; do
193                 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
194                         if [ -n "${verbose}" ] ; then
195                                 echo Keeping v850 stuff in $i
196                         fi
197                 fi
198         done
199 else
200         for i in $v850_files ; do
201                 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
202                         if [ -n "${verbose}" ] ; then
203                                 echo Removing traces of \"v850\" from $i...
204                         fi
205                         cp $i new
206                         sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
207                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
208                                 if [ -n "${verbose}" ] ; then
209                                         echo Caching $i in .Recover...
210                                 fi
211                                 mv $i .Recover
212                         fi
213                         mv new $i
214                 fi
215         done
216 fi
217
218 tic80_files="ChangeLog configure.in configure"
219 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
220         for i in $tic80_files ; do
221                 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
222                         if [ -n "${verbose}" ] ; then
223                                 echo Keeping tic80 stuff in $i
224                         fi
225                 fi
226         done
227 else
228         for i in $tic80_files ; do
229                 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
230                         if [ -n "${verbose}" ] ; then
231                                 echo Removing traces of \"tic80\" from $i...
232                         fi
233                         cp $i new
234                         sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
235                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
236                                 if [ -n "${verbose}" ] ; then
237                                         echo Caching $i in .Recover...
238                                 fi
239                                 mv $i .Recover
240                         fi
241                         mv new $i
242                 fi
243         done
244 fi
245
246 for i in * ; do
247         if test ! -d $i && (grep sanitize $i > /dev/null) ; then
248                 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
249         fi
250 done
251
252 #
253 # End of file.