1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / .Sanitize
CommitLineData
e7db3d77 1# .Sanitize for devo/gdb/testsuite.
bf3d2b75 2
33268150 3# Each directory to survive its way into a release will need a file
bf3d2b75
MW
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
16Do-first:
17
f35ea218
KS
18gdbtk_files="gdb.gdbtk"
19
20if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
21 lose_these_too="${gdbtk_files} ${lose_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Deleting ${gdbtk_files}
24 fi
25else
26 keep_these_too="${gdbtk_files} ${keep_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Keeping ${gdbtk_files}
29 fi
30fi
31
bf3d2b75
MW
32# All files listed between the "Things-to-keep:" line and the
33# "Do-last:" line will be kept. All other files will be removed.
34# Directories listed in this section will have their own Sanitize
35# called. Directories not listed will be removed in their entirety
36# with rm -rf.
37
38Things-to-keep:
39
bf3d2b75
MW
40.gdbinit
41ChangeLog
42Makefile.in
80edc7cb 43TODO
e7db3d77 44aclocal.m4
bf3d2b75 45config
e7db3d77 46configure
bf3d2b75 47configure.in
aeab18c9 48gdb.asm
33268150
SS
49gdb.base
50gdb.c++
87544f53 51gdb.chill
15598f42 52gdb.disasm
e3289040 53gdb.fortran
2e11d9cc 54gdb.hp
5e786183 55gdb.stabs
f27ffb51 56gdb.threads
209c77a8 57gdb.trace
33268150
SS
58lib
59
60Things-to-lose:
61
87756e15 62# The lines between the "Do-last:" line and the end of the file
bf3d2b75
MW
63# are executed as a /bin/sh shell script after everything else is
64# done.
65
66Do-last:
67
1e012f70
FL
68never_files="ChangeLog"
69for i in $never_files ; do
70 if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then
71 if [ -n "${verbose}" ] ; then
72 echo Removing traces of \"cygnus-never\" from $i...
73 fi
74 cp $i new
3cc72fbe 75 sed '/start\-sanitize\-cygnus-never/,/end\-sanitize\-cygnus-never/d' < $i > new
1e012f70
FL
76 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
77 if [ -n "${verbose}" ] ; then
78 echo Caching $i in .Recover...
79 fi
80 mv $i .Recover
81 fi
82 mv new $i
83 fi
84done
85
54977a68
JL
86am33_files="ChangeLog"
87if ( echo $* | grep keep\-am33 > /dev/null ) ; then
88 for i in $am33_files ; do
89 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
90 if [ -n "${verbose}" ] ; then
91 echo Keeping am33 stuff in $i
92 fi
93 fi
94 done
95else
96 for i in $am33_files ; do
97 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
98 if [ -n "${verbose}" ] ; then
99 echo Removing traces of \"am33\" from $i...
100 fi
101 cp $i new
102 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
103 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
104 if [ -n "${verbose}" ] ; then
105 echo Caching $i in .Recover...
106 fi
107 mv $i .Recover
108 fi
109 mv new $i
110 fi
111 done
112fi
113
f35ea218
KS
114if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
115 echo Catering to RMS by removing traces of \"gdbtk\"...
116 for i in * ; do
117 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
118 echo Removing traces of \"gdbtk\" out of $i...
119 cp $i new
120 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
121 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
122 echo Caching $i in .Recover...
123 mv $i .Recover
124 fi
125 mv new $i
126 fi
127 done
128else
129 echo Leaving \"gdbtk\" in the sources...
130 for i in * ; do
131 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
132 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
133 cp $i new
134 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
135 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
136 echo Caching $i in .Recover...
137 mv $i .Recover
138 fi
139 mv new $i
140 fi
141 done
142fi
143
54977a68
JL
144for i in * ; do
145 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
146 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
147 fi
148done
149
bf3d2b75 150# eof
This page took 0.32405 seconds and 4 git commands to generate.