From: Miles Bader <miles@gnu.ai.mit.edu>
[binutils-gdb.git] / gdb / .Sanitize
1 # .Sanitize for devo/gdb.
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 arc_files="arc-tdep.c remote-arc.c"
19
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21 keep_these_too="${arc_files} ${keep_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Keeping ${arc_files}
24 fi
25 else
26 lose_these_too="${arc_files} ${lose_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Deleting ${arc_files}
29 fi
30 fi
31
32 gdbtk_files="README.GDBTK gdbtk.c gdbtk.tcl"
33
34 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
35 lose_these_too="${gdbtk_files} ${lose_these_too}"
36 if [ -n "${verbose}" ] ; then
37 echo Deleting ${gdbtk_files}
38 fi
39 else
40 keep_these_too="${gdbtk_files} ${keep_these_too}"
41 if [ -n "${verbose}" ] ; then
42 echo Keeping ${gdbtk_files}
43 fi
44 fi
45
46 # WinGDB files are not really ready to be part of FSF releases, but
47 # keep them for progressives and such.
48
49 mswin_files="mswin"
50
51 if ( echo $* | grep lose\-mswin > /dev/null ) ; then
52 lose_these_too="${mswin_files} ${lose_these_too}"
53 if [ -n "${verbose}" ] ; then
54 echo Deleting ${mswin_files}
55 fi
56 else
57 keep_these_too="${mswin_files} ${keep_these_too}"
58 if [ -n "${verbose}" ] ; then
59 echo Keeping ${mswin_files}
60 fi
61 fi
62
63 gm_files="gmagic.c gmagic.h"
64
65 if ( echo $* | grep keep\-gm > /dev/null ) ; then
66 keep_these_too="${gm_files} ${keep_these_too}"
67 if [ -n "${verbose}" ] ; then
68 echo Keeping ${gm_files}
69 fi
70 else
71 lose_these_too="${gm_files} ${lose_these_too}"
72 if [ -n "${verbose}" ] ; then
73 echo Deleting ${gm_files}
74 fi
75 fi
76
77 # All files listed between the "Things-to-keep:" line and the
78 # "Files-to-sed:" line will be kept. All other files will be removed.
79 # Directories listed in this section will have their own Sanitize
80 # called. Directories not listed will be removed in their entirety
81 # with rm -rf.
82
83 Things-to-keep:
84
85 .gdbinit
86 29k-share
87 COPYING
88 ChangeLog
89 ChangeLog-3.x
90 ChangeLog-9091
91 ChangeLog-92
92 ChangeLog-93
93 ChangeLog-94
94 ChangeLog-95
95 Makefile.in
96 NEWS
97 README
98 TODO
99 a29k-tdep.c
100 a68v-nat.c
101 aclocal.m4
102 acconfig.h
103 alpha-nat.c
104 alpha-tdep.c
105 altos-xdep.c
106 annotate.c
107 annotate.h
108 arm-convert.s
109 arm-tdep.c
110 arm-xdep.c
111 bcache.c
112 bcache.h
113 blockframe.c
114 breakpoint.c
115 breakpoint.h
116 buildsym.c
117 buildsym.h
118 callback.c
119 callback.h
120 c-exp.y
121 c-lang.c
122 c-lang.h
123 c-typeprint.c
124 c-valprint.c
125 call-cmds.h
126 ch-exp.c
127 ch-lang.c
128 ch-lang.h
129 ch-typeprint.c
130 ch-valprint.c
131 coff-solib.c
132 coff-solib.h
133 coffread.c
134 command.c
135 command.h
136 complaints.c
137 complaints.h
138 config
139 config.in
140 configure
141 configure.in
142 convex-tdep.c
143 convex-xdep.c
144 copying.awk
145 copying.c
146 core-aout.c
147 core-regset.c
148 core-sol2.c
149 corefile.c
150 corelow.c
151 cp-valprint.c
152 cpu32bug-rom.c
153 cxux-nat.c
154 dbxread.c
155 dcache.c
156 dcache.h
157 defs.h
158 delta68-nat.c
159 demangle.c
160 doc
161 dpx2-nat.c
162 dsrec.c
163 dst.h
164 dstread.c
165 dwarfread.c
166 elfread.c
167 environ.c
168 environ.h
169 eval.c
170 exec.c
171 exc_request.defs
172 expprint.c
173 expression.h
174 f-exp.y
175 f-lang.c
176 f-lang.h
177 f-typeprint.c
178 f-valprint.c
179 findvar.c
180 fork-child.c
181 frame.h
182 gdb_stat.h
183 gdb_string.h
184 gdb-stabs.h
185 gdb.1
186 gdb.gdb
187 gdba.el
188 gdbcmd.h
189 gdbcore.h
190 gdbserver
191 gdbtypes.c
192 gdbtypes.h
193 gnu-nat.c
194 gnu-nat.h
195 gnu-regex.c
196 gnu-regex.h
197 go32-xdep.c
198 gould-tdep.c
199 gould-xdep.c
200 h8300-tdep.c
201 h8500-tdep.c
202 hp300ux-nat.c
203 hppa-tdep.c
204 hppab-nat.c
205 hppah-nat.c
206 hppam3-nat.c
207 hpread.c
208 i386-stub.c
209 i386-tdep.c
210 i386aix-nat.c
211 i386b-nat.c
212 i386gnu-nat.c
213 i386ly-tdep.c
214 i386m3-nat.c
215 i386mach-nat.c
216 i386v-nat.c
217 i386v4-nat.c
218 i387-tdep.c
219 i960-tdep.c
220 infcmd.c
221 inferior.h
222 inflow.c
223 infptrace.c
224 infrun.c
225 inftarg.c
226 irix4-nat.c
227 irix5-nat.c
228 isi-xdep.c
229 kdb-start.c
230 language.c
231 language.h
232 lynx-nat.c
233 m2-exp.y
234 m2-lang.c
235 m2-lang.h
236 m2-typeprint.c
237 m2-valprint.c
238 m3-nat.c
239 m68k-stub.c
240 m68k-tdep.c
241 m68knbsd-nat.c
242 m88k-nat.c
243 m88k-tdep.c
244 mac-defs.h
245 mac-xdep.c
246 mac-gdb.r
247 mac-nat.c
248 main.c
249 maint.c
250 mdebugread.c
251 mem-break.c
252 minimon.h
253 minsyms.c
254 mips-nat.c
255 mips-tdep.c
256 mipsm3-nat.c
257 mipsv4-nat.c
258 mipsread.c
259 mon960-rom.c
260 monitor.h
261 monitor.c
262 mpw-config.in
263 mpw-make.sed
264 msg.defs
265 msg_reply.defs
266 news-xdep.c
267 nindy-share
268 nindy-tdep.c
269 nlm
270 nlmread.c
271 notify.defs
272 ns32k-tdep.c
273 ns32km3-nat.c
274 objfiles.c
275 objfiles.h
276 op50-rom.c
277 os9kread.c
278 osfsolib.c
279 parse.c
280 parser-defs.h
281 partial-stab.h
282 ppcbug-rom.c
283 printcmd.c
284 process_reply.defs
285 procfs.c
286 ptx4-nat.c
287 pyr-tdep.c
288 pyr-xdep.c
289 remote-adapt.c
290 remote-array.c
291 remote-bug.c
292 remote-e7000.c
293 remote-eb.c
294 remote-es.c
295 remote-est.c
296 remote-hms.c
297 remote-mips.c
298 remote-mm.c
299 remote-nindy.c
300 remote-nrom.c
301 remote-os9k.c
302 remote-pa.c
303 remote-rdp.c
304 remote-sim.c
305 remote-sim.h
306 remote-st.c
307 remote-udi.c
308 remote-utils.c
309 remote-utils.h
310 remote-vx.c
311 remote-vx29k.c
312 remote-vx68.c
313 remote-vx960.c
314 remote-vxmips.c
315 remote-vxsparc.c
316 remote.c
317 reply_mig_hack.awk
318 rs6000-nat.c
319 rs6000-tdep.c
320 rom68k-rom.c
321 saber.suppress
322 scm-exp.c
323 scm-lang.c
324 scm-lang.h
325 scm-tags.h
326 scm-valprint.c
327 ser-e7kpc.c
328 ser-go32.c
329 ser-mac.c
330 ser-tcp.c
331 ser-unix.c
332 serial.c
333 serial.h
334 sh-tdep.c
335 sh3-rom.c
336 signals.h
337 solib.c
338 solib.h
339 somread.c
340 somsolib.c
341 somsolib.h
342 source.c
343 sparc-nat.c
344 sparc-stub.c
345 sparc-tdep.c
346 sparcl-stub.c
347 sparcl-tdep.c
348 srec.h
349 stabsread.c
350 stabsread.h
351 stack.c
352 standalone.c
353 stop-gdb.c
354 stuff.c
355 sun3-nat.c
356 sun386-nat.c
357 symfile.c
358 symfile.h
359 symm-nat.c
360 symm-tdep.c
361 symmisc.c
362 symtab.c
363 symtab.h
364 tahoe-tdep.c
365 target.c
366 target.h
367 terminal.h
368 testsuite
369 thread.c
370 thread.h
371 top.c
372 top.h
373 typeprint.c
374 typeprint.h
375 ultra3-nat.c
376 ultra3-xdep.c
377 umax-xdep.c
378 utils.c
379 valarith.c
380 valops.c
381 valprint.c
382 valprint.h
383 value.h
384 values.c
385 vax-tdep.c
386 vx-share
387 w65-tdep.c
388 w89k-rom.c
389 win32-nat.c
390 xcoffread.c
391 xcoffsolib.c
392 xcoffsolib.h
393 xmodem.c
394 xmodem.h
395 z8k-tdep.c
396
397 # Things which are explicitly *not* kept, for now.
398
399 Things-to-lose:
400
401 ser-go32-para.c
402 HOW_TO_RELEASE
403
404 Do-last:
405
406 # Don't try to clean directories here, as the 'mv' command will fail.
407 # Also, grep fails on NFS mounted directories.
408 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
409 echo Catering to RMS by removing traces of \"gdbtk\"...
410 for i in * ; do
411 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
412 echo Removing traces of \"gdbtk\" out of $i...
413 cp $i new
414 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
415 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
416 echo Caching $i in .Recover...
417 mv $i .Recover
418 fi
419 mv new $i
420 fi
421 done
422 else
423 echo Leaving \"gdbtk\" in the sources...
424 for i in * ; do
425 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
426 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
427 cp $i new
428 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
429 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
430 echo Caching $i in .Recover...
431 mv $i .Recover
432 fi
433 mv new $i
434 fi
435 done
436 fi
437
438 r16_files="configure.in configure"
439
440 if ( echo $* | grep keep\-r16 > /dev/null ) ; then
441 for i in $r16_files ; do
442 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
443 if [ -n "${verbose}" ] ; then
444 echo Keeping r16 stuff in $i
445 fi
446 fi
447 done
448 else
449 for i in $r16_files ; do
450 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
451 if [ -n "${verbose}" ] ; then
452 echo Removing traces of \"r16\" from $i...
453 fi
454 cp $i new
455 sed '/start\-sanitize\-r16/,/end-\sanitize\-r16/d' < $i > new
456 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
457 if [ -n "${verbose}" ] ; then
458 echo Caching $i in .Recover...
459 fi
460 mv $i .Recover
461 fi
462 mv new $i
463 fi
464 done
465 fi
466
467 arc_files="configure.in configure ChangeLog-95"
468
469 if ( echo $* | grep keep\-arc > /dev/null ) ; then
470 for i in $arc_files ; do
471 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
472 if [ -n "${verbose}" ] ; then
473 echo Keeping arc stuff in $i
474 fi
475 fi
476 done
477 else
478 for i in $arc_files ; do
479 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
480 if [ -n "${verbose}" ] ; then
481 echo Removing traces of \"arc\" from $i...
482 fi
483 cp $i new
484 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
485 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
486 if [ -n "${verbose}" ] ; then
487 echo Caching $i in .Recover...
488 fi
489 mv $i .Recover
490 fi
491 mv new $i
492 fi
493 done
494 fi
495
496 if ( echo $* | grep keep\-gm > /dev/null ) ; then
497 for i in * ; do
498 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
499 if [ -n "${verbose}" ] ; then
500 echo Keeping gm stuff in $i
501 fi
502 fi
503 done
504 else
505 for i in * ; do
506 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
507 if [ -n "${verbose}" ] ; then
508 echo Removing traces of \"gm\" from $i...
509 fi
510 cp $i new
511 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
512 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
513 if [ -n "${verbose}" ] ; then
514 echo Caching $i in .Recover...
515 fi
516 mv $i .Recover
517 fi
518 mv new $i
519 fi
520 done
521 fi
522
523 for i in * ; do
524 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
525 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
526 fi
527 done
528
529 #
530 # End of file.