Add the rest of the commands needed by GDB.
[deliverable/binutils-gdb.git] / .Sanitize
1 # .Sanitize for devo.
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 keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf
19 bfd binutils byacc cvs deja-gnu dejagnu diff dosrel dvips emacs emacs19
20 examples expect fileutils flex gas gcc gdb gdbm gdbtest glob gprof grep
21 groff include install.sh ispell ld libg++ libgcc libgloss libiberty
22 libio librx libstdc++ m4 make mmalloc move-if-change newlib opcodes
23 pagas patch prms rcs readline sed send-pr shellutils sim tcl textutils
24 tk test-build.mk texinfo tgas utils uudecode wdiff xiberty"
25
26 cygnus_files="release release-info build-all.mk COPYING.NEWLIB"
27
28 if ( echo $* | grep keep\-cygnus > /dev/null) ; then
29 keep_these_too="${keep_these_too} ${cygnus_files}"
30 else
31 lose_these_too="${lose_these_too} ${cygnus_files}"
32 fi
33
34 mpw_files="mpw-README mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw"
35
36 if ( echo $* | grep keep\-mpw > /dev/null) ; then
37 keep_these_too="${keep_these_too} ${mpw_files}"
38 else
39 lose_these_too="${lose_these_too} ${mpw_files}"
40 fi
41
42 # This top-level directory is special. We often check out only subsets
43 # of this directory, and complaining about directories or files we didn't
44 # check out just gets obnoxious.
45
46 list="${keep_these_too}"
47 keep_these_too=
48
49 for file in $list ; do
50 if [ -r $file ] || [ -d $file ] ; then
51 keep_these_too="${keep_these_too} $file"
52 fi
53 done
54
55 list="${lose_these_too}"
56 lose_these_too=
57
58 for file in $list ; do
59 if [ -r $file ] || [ -d $file ] ; then
60 lose_these_too="${lose_these_too} $file"
61 fi
62 done
63
64 # All files listed between the "Things-to-keep:" line and the
65 # "Do-last:" line will be kept. All other files will be removed.
66 # Directories listed in this section will have their own Sanitize
67 # called. Directories not listed will be removed in their entirety
68 # with rm -rf.
69
70 Things-to-keep:
71
72 COPYING
73 COPYING.LIB
74 ChangeLog
75 Makefile.in
76 README
77 config
78 config.guess
79 config.sub
80 configure
81 configure.in
82 etc
83 # These will only show up if they checked out gas-extra-stuff.
84 configure.bat
85 makeall.bat
86
87 Things-to-lose:
88
89 # The lines between the "Do-last:" line and the end of the file
90 # are executed as a /bin/sh shell script after everything else is
91 # done.
92
93 Do-last:
94
95 if ( echo $* | egrep verbose > /dev/null ) ; then
96 verbose=true
97 else
98 verbose=
99 fi
100
101 # Remove "sanitize-Sanitize" lines.
102 if [ -n "${verbose}" ] ; then
103 echo Cleaning unconditional sanitizations out of Makefile.in...
104 fi
105 cp Makefile.in new
106 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
107 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
108 mv Makefile.in .Recover
109 fi
110 mv new Makefile.in
111
112 if [ -n "${verbose}" ] ; then
113 echo Thawing away the \"chill\"...
114 fi
115
116 # Don't try to clean directories here, as the 'mv' command will fail.
117 # Also, grep fails on NFS mounted directories.
118 if ( echo $* | grep keep\-chill > /dev/null ) ; then
119 for i in * ; do
120 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
121 if [ -n "${verbose}" ] ; then
122 echo Keeping chill stuff in $i
123 fi
124 fi
125 done
126 else
127 for i in * ; do
128 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
129 if [ -n "${verbose}" ] ; then
130 echo Thawing the \"chill\" out of $i...
131 fi
132 cp $i new
133 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
134 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
135 if [ -n "${verbose}" ] ; then
136 echo Caching $i in .Recover...
137 fi
138 mv $i .Recover
139 fi
140 mv new $i
141 fi
142 done
143 fi
144
145 if [ -n "${verbose}" ] ; then
146 echo Removing traces of \"mpw\"...
147 fi
148
149 # Don't try to clean directories here, as the 'mv' command will fail.
150 # Also, grep fails on NFS mounted directories.
151 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
152 for i in * ; do
153 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
154 if [ -n "${verbose}" ] ; then
155 echo Keeping mpw stuff in $i
156 fi
157 fi
158 done
159 else
160 for i in * ; do
161 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
162 if [ -n "${verbose}" ] ; then
163 echo Removing traces of \"mpw\" from $i...
164 fi
165 cp $i new
166 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
167 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
168 if [ -n "${verbose}" ] ; then
169 echo Caching $i in .Recover...
170 fi
171 mv $i .Recover
172 fi
173 mv new $i
174 fi
175 done
176 fi
177
178 if [ -n "${verbose}" ] ; then
179 echo Processing \"arc\"...
180 fi
181
182 # Don't try to clean directories here, as the 'mv' command will fail.
183 # Also, grep fails on NFS mounted directories.
184 if ( echo $* | grep keep\-arc > /dev/null ) ; then
185 for i in * ; do
186 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
187 if [ -n "${verbose}" ] ; then
188 echo Keeping arc stuff in $i
189 fi
190 fi
191 done
192 else
193 for i in * ; do
194 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
195 if [ -n "${verbose}" ] ; then
196 echo Removing traces of \"arc\" from $i...
197 fi
198 cp $i new
199 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
200 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
201 if [ -n "${verbose}" ] ; then
202 echo Caching $i in .Recover...
203 fi
204 mv $i .Recover
205 fi
206 mv new $i
207 fi
208 done
209 fi
210
211 rce_files="config.sub"
212
213 if ( echo $* | grep keep\-rce > /dev/null ) ; then
214 for i in $rce_files ; do
215 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
216 if [ -n "${verbose}" ] ; then
217 echo Keeping rce stuff in $i
218 fi
219 fi
220 done
221 else
222 for i in $rce_files ; do
223 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
224 if [ -n "${verbose}" ] ; then
225 echo Removing traces of \"rce\" from $i...
226 fi
227 cp $i new
228 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
229 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
230 if [ -n "${verbose}" ] ; then
231 echo Caching $i in .Recover...
232 fi
233 mv $i .Recover
234 fi
235 mv new $i
236 fi
237 done
238 fi
239
240 for i in * ; do
241 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
242 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
243 fi
244 done
245
246 # eof
This page took 0.033827 seconds and 4 git commands to generate.