Commit | Line | Data |
---|---|---|
43e36dd2 | 1 | # .Sanitize for devo. |
a93b3c77 | 2 | |
5db7ecb7 | 3 | # Each directory to survive its way into a release will need a file |
a93b3c77 RP |
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 | |
43e36dd2 | 14 | # done in this directory. |
a93b3c77 RP |
15 | |
16 | Do-first: | |
17 | ||
1ed0529e | 18 | keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf |
e03b0bca KR |
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 | |
f38cb096 JM |
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 | |
2822305b | 24 | tk texinfo tgas utils uudecode wdiff xiberty" |
e03b0bca | 25 | |
2822305b | 26 | cygnus_files="release release-info build-all.mk test-build.mk COPYING.NEWLIB" |
96c805d8 | 27 | |
7d0eab7b | 28 | if ( echo $* | grep keep\-cygnus > /dev/null) ; then |
96c805d8 | 29 | keep_these_too="${keep_these_too} ${cygnus_files}" |
80cad9cc | 30 | else |
96c805d8 | 31 | lose_these_too="${lose_these_too} ${cygnus_files}" |
7d0eab7b DZ |
32 | fi |
33 | ||
fc5a05e9 SS |
34 | gdbtk_files="tcl tk" |
35 | ||
36 | if ( echo $* | grep lose\-gdbtk > /dev/null) ; then | |
37 | lose_these_too="${lose_these_too} ${gdbtk_files}" | |
38 | if [ -n "${verbose}" ] ; then | |
39 | echo Deleting ${gdbtk_files} | |
40 | fi | |
41 | else | |
42 | keep_these_too="${keep_these_too} ${gdbtk_files}" | |
43 | if [ -n "${verbose}" ] ; then | |
44 | echo Keeping ${gdbtk_files} | |
45 | fi | |
5db7ecb7 | 46 | fi |
7d0eab7b | 47 | |
77cbdd35 DE |
48 | # This is for newlib net releases. |
49 | # We don't check for duplicates of COPYING.NEWLIB appearing because it's not | |
50 | # intended that keep-cygnus and keep-newlib be used together. | |
51 | newlib_files="COPYING.NEWLIB" | |
52 | ||
53 | if ( echo $* | grep keep\-newlib > /dev/null) ; then | |
54 | keep_these_too="${keep_these_too} ${newlib_files}" | |
55 | else | |
56 | lose_these_too="${lose_these_too} ${newlib_files}" | |
57 | fi | |
58 | ||
e03b0bca KR |
59 | # This top-level directory is special. We often check out only subsets |
60 | # of this directory, and complaining about directories or files we didn't | |
61 | # check out just gets obnoxious. | |
62 | ||
63 | list="${keep_these_too}" | |
64 | keep_these_too= | |
65 | ||
66 | for file in $list ; do | |
67 | if [ -r $file ] || [ -d $file ] ; then | |
68 | keep_these_too="${keep_these_too} $file" | |
69 | fi | |
70 | done | |
71 | ||
72 | list="${lose_these_too}" | |
73 | lose_these_too= | |
74 | ||
75 | for file in $list ; do | |
76 | if [ -r $file ] || [ -d $file ] ; then | |
77 | lose_these_too="${lose_these_too} $file" | |
78 | fi | |
79 | done | |
80 | ||
a93b3c77 | 81 | # All files listed between the "Things-to-keep:" line and the |
43e36dd2 | 82 | # "Do-last:" line will be kept. All other files will be removed. |
a93b3c77 RP |
83 | # Directories listed in this section will have their own Sanitize |
84 | # called. Directories not listed will be removed in their entirety | |
85 | # with rm -rf. | |
86 | ||
87 | Things-to-keep: | |
88 | ||
6e37b215 PB |
89 | COPYING |
90 | COPYING.LIB | |
57d32184 | 91 | ChangeLog |
a93b3c77 | 92 | Makefile.in |
965a9f14 | 93 | README |
a93b3c77 | 94 | config |
5cc24596 | 95 | config.guess |
db2de419 | 96 | config.sub |
a93b3c77 RP |
97 | configure |
98 | configure.in | |
701df845 | 99 | etc |
3be6e47e | 100 | # These will only show up if they checked out gas-extra-stuff. |
16004cc8 KR |
101 | configure.bat |
102 | makeall.bat | |
7f390875 SS |
103 | mpw-README |
104 | mpw-configure | |
105 | mpw-config.in | |
106 | mpw-build.in | |
a93b3c77 | 107 | |
87756e15 | 108 | Things-to-lose: |
d8cbfdec | 109 | testsuite |
87756e15 | 110 | |
43e36dd2 RP |
111 | # The lines between the "Do-last:" line and the end of the file |
112 | # are executed as a /bin/sh shell script after everything else is | |
113 | # done. | |
114 | ||
a93b3c77 RP |
115 | Do-last: |
116 | ||
bf150019 DE |
117 | # Don't try to clean directories here, as the 'mv' command will fail. |
118 | # Also, grep fails on NFS mounted directories. | |
119 | ||
7b85349f RP |
120 | if ( echo $* | egrep verbose > /dev/null ) ; then |
121 | verbose=true | |
122 | else | |
123 | verbose= | |
124 | fi | |
125 | ||
eecef7ef FF |
126 | # Remove "sanitize-Sanitize" lines. |
127 | if [ -n "${verbose}" ] ; then | |
128 | echo Cleaning unconditional sanitizations out of Makefile.in... | |
129 | fi | |
130 | cp Makefile.in new | |
131 | sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new | |
132 | if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then | |
133 | mv Makefile.in .Recover | |
134 | fi | |
135 | mv new Makefile.in | |
136 | ||
7b85349f RP |
137 | if [ -n "${verbose}" ] ; then |
138 | echo Thawing away the \"chill\"... | |
139 | fi | |
5d4ec851 | 140 | |
5d4ec851 FF |
141 | if ( echo $* | grep keep\-chill > /dev/null ) ; then |
142 | for i in * ; do | |
143 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
144 | if [ -n "${verbose}" ] ; then |
145 | echo Keeping chill stuff in $i | |
146 | fi | |
5d4ec851 FF |
147 | fi |
148 | done | |
149 | else | |
150 | for i in * ; do | |
151 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
152 | if [ -n "${verbose}" ] ; then |
153 | echo Thawing the \"chill\" out of $i... | |
154 | fi | |
5d4ec851 FF |
155 | cp $i new |
156 | sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new | |
157 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
7b85349f RP |
158 | if [ -n "${verbose}" ] ; then |
159 | echo Caching $i in .Recover... | |
160 | fi | |
5d4ec851 FF |
161 | mv $i .Recover |
162 | fi | |
163 | mv new $i | |
164 | fi | |
165 | done | |
5d4ec851 FF |
166 | fi |
167 | ||
86118528 KR |
168 | if [ -n "${verbose}" ] ; then |
169 | echo Processing \"arc\"... | |
170 | fi | |
171 | ||
bf150019 DE |
172 | arc_files="config.sub configure.in" |
173 | ||
86118528 | 174 | if ( echo $* | grep keep\-arc > /dev/null ) ; then |
bf150019 | 175 | for i in $arc_files ; do |
86118528 KR |
176 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then |
177 | if [ -n "${verbose}" ] ; then | |
178 | echo Keeping arc stuff in $i | |
179 | fi | |
180 | fi | |
181 | done | |
182 | else | |
183 | for i in * ; do | |
184 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
185 | if [ -n "${verbose}" ] ; then | |
186 | echo Removing traces of \"arc\" from $i... | |
187 | fi | |
188 | cp $i new | |
189 | sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new | |
bf150019 DE |
190 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
191 | if [ -n "${verbose}" ] ; then | |
192 | echo Caching $i in .Recover... | |
193 | fi | |
194 | mv $i .Recover | |
195 | fi | |
196 | mv new $i | |
197 | fi | |
198 | done | |
199 | fi | |
200 | ||
201 | psion_files="config.sub configure.in" | |
202 | ||
203 | if ( echo $* | grep keep\-psion > /dev/null ) ; then | |
204 | for i in $psion_files; do | |
205 | if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then | |
206 | if [ -n "${verbose}" ] ; then | |
207 | echo Keeping psion stuff in $i | |
208 | fi | |
209 | fi | |
210 | done | |
211 | else | |
212 | for i in * ; do | |
213 | if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then | |
214 | if [ -n "${verbose}" ] ; then | |
215 | echo Removing traces of \"psion\" from $i... | |
216 | fi | |
217 | cp $i new | |
218 | sed '/start\-sanitize\-psion/,/end-\sanitize\-psion/d' < $i > new | |
86118528 KR |
219 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
220 | if [ -n "${verbose}" ] ; then | |
221 | echo Caching $i in .Recover... | |
222 | fi | |
223 | mv $i .Recover | |
224 | fi | |
225 | mv new $i | |
226 | fi | |
227 | done | |
228 | fi | |
229 | ||
03c4ce2f | 230 | rce_files="config.sub" |
5c680afd | 231 | |
03c4ce2f MT |
232 | if ( echo $* | grep keep\-rce > /dev/null ) ; then |
233 | for i in $rce_files ; do | |
234 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 235 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 236 | echo Keeping rce stuff in $i |
5c680afd MT |
237 | fi |
238 | fi | |
239 | done | |
240 | else | |
03c4ce2f MT |
241 | for i in $rce_files ; do |
242 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 243 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 244 | echo Removing traces of \"rce\" from $i... |
5c680afd MT |
245 | fi |
246 | cp $i new | |
03c4ce2f | 247 | sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new |
5c680afd MT |
248 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
249 | if [ -n "${verbose}" ] ; then | |
250 | echo Caching $i in .Recover... | |
251 | fi | |
252 | mv $i .Recover | |
253 | fi | |
254 | mv new $i | |
255 | fi | |
256 | done | |
257 | fi | |
258 | ||
e11b54be PB |
259 | for i in * ; do |
260 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
7b85349f | 261 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 |
e11b54be PB |
262 | fi |
263 | done | |
57d32184 RP |
264 | |
265 | # eof |