]>
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 | ||
eccc57e5 | 18 | cygnus_files="release release-info build-all.mk" |
96c805d8 | 19 | |
7d0eab7b | 20 | if ( echo $* | grep keep\-cygnus > /dev/null) ; then |
96c805d8 | 21 | keep_these_too="${keep_these_too} ${cygnus_files}" |
80cad9cc | 22 | else |
96c805d8 | 23 | lose_these_too="${lose_these_too} ${cygnus_files}" |
7d0eab7b DZ |
24 | fi |
25 | ||
eccc57e5 | 26 | mpw_files="mpw-README mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw" |
96c805d8 | 27 | |
5db7ecb7 | 28 | if ( echo $* | grep keep\-mpw > /dev/null) ; then |
96c805d8 | 29 | keep_these_too="${keep_these_too} ${mpw_files}" |
5db7ecb7 | 30 | else |
96c805d8 | 31 | lose_these_too="${lose_these_too} ${mpw_files}" |
5db7ecb7 | 32 | fi |
7d0eab7b | 33 | |
a93b3c77 | 34 | # All files listed between the "Things-to-keep:" line and the |
43e36dd2 | 35 | # "Do-last:" line will be kept. All other files will be removed. |
a93b3c77 RP |
36 | # Directories listed in this section will have their own Sanitize |
37 | # called. Directories not listed will be removed in their entirety | |
38 | # with rm -rf. | |
39 | ||
40 | Things-to-keep: | |
41 | ||
c9b36b5f | 42 | .cvsignore |
6e37b215 PB |
43 | COPYING |
44 | COPYING.LIB | |
6227a92b | 45 | CYGNUS |
57d32184 | 46 | ChangeLog |
a93b3c77 | 47 | Makefile.in |
965a9f14 | 48 | README |
28f760d3 | 49 | autoconf |
d5eb68fa | 50 | bfd |
ebec4684 | 51 | binutils |
6a2d7603 | 52 | byacc |
a93b3c77 | 53 | config |
5cc24596 | 54 | config.guess |
db2de419 | 55 | config.sub |
a93b3c77 RP |
56 | configure |
57 | configure.in | |
cdabe523 | 58 | cvs |
8ec1b2a1 | 59 | deja-gnu |
d623fd7e | 60 | dejagnu |
5781b1ba | 61 | diff |
632ee4a1 | 62 | dosrel |
4e0c2de7 | 63 | dvips |
cdabe523 | 64 | emacs |
701df845 | 65 | etc |
17519312 | 66 | expect |
4e0c2de7 | 67 | fileutils |
49df2308 | 68 | flex |
a93b3c77 | 69 | gas |
ebec4684 RP |
70 | gcc |
71 | gdb | |
f3d3d2cd | 72 | gdbm |
e72c4b3a | 73 | gdbtest |
f7f4df6a | 74 | glob |
9a14a29d | 75 | gprof |
5781b1ba | 76 | grep |
4e0c2de7 | 77 | groff |
a93b3c77 | 78 | include |
4a01dc52 | 79 | install.sh |
2dbd15d2 | 80 | ispell |
ebec4684 | 81 | ld |
0862386b | 82 | libg++ |
e72c4b3a RP |
83 | libgcc |
84 | libiberty | |
7c4dd2c8 | 85 | libio |
4e0c2de7 | 86 | m4 |
cdabe523 | 87 | make |
d592622a | 88 | mmalloc |
e72c4b3a | 89 | move-if-change |
6ae8fff5 | 90 | newlib |
aa06ff7e | 91 | opcodes |
ba8acf46 | 92 | pagas |
57d32184 | 93 | patch |
d42563da | 94 | prms |
3c8735af | 95 | rcs |
a93b3c77 | 96 | readline |
4e0c2de7 | 97 | sed |
00d8b290 | 98 | send-pr |
4e0c2de7 | 99 | shellutils |
da7e4b5c | 100 | sim |
17519312 | 101 | tcl |
4e0c2de7 DZ |
102 | textutils |
103 | tk | |
c9b36b5f | 104 | test-build.mk |
d239963b | 105 | texinfo |
14bed8ee | 106 | tgas |
ba8acf46 | 107 | utils |
fa64be8d | 108 | uudecode |
4e0c2de7 DZ |
109 | wdiff |
110 | xiberty | |
a93b3c77 | 111 | |
87756e15 RP |
112 | Things-to-lose: |
113 | ||
43e36dd2 RP |
114 | # The lines between the "Do-last:" line and the end of the file |
115 | # are executed as a /bin/sh shell script after everything else is | |
116 | # done. | |
117 | ||
a93b3c77 RP |
118 | Do-last: |
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 FF |
140 | |
141 | # Don't try to clean directories here, as the 'mv' command will fail. | |
142 | # Also, grep fails on NFS mounted directories. | |
143 | if ( echo $* | grep keep\-chill > /dev/null ) ; then | |
144 | for i in * ; do | |
145 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
146 | if [ -n "${verbose}" ] ; then |
147 | echo Keeping chill stuff in $i | |
148 | fi | |
5d4ec851 FF |
149 | fi |
150 | done | |
151 | else | |
152 | for i in * ; do | |
153 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
154 | if [ -n "${verbose}" ] ; then |
155 | echo Thawing the \"chill\" out of $i... | |
156 | fi | |
5d4ec851 FF |
157 | cp $i new |
158 | sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new | |
159 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
7b85349f RP |
160 | if [ -n "${verbose}" ] ; then |
161 | echo Caching $i in .Recover... | |
162 | fi | |
5d4ec851 FF |
163 | mv $i .Recover |
164 | fi | |
165 | mv new $i | |
166 | fi | |
167 | done | |
5d4ec851 FF |
168 | fi |
169 | ||
5db7ecb7 SS |
170 | if [ -n "${verbose}" ] ; then |
171 | echo Removing traces of \"mpw\"... | |
172 | fi | |
173 | ||
174 | # Don't try to clean directories here, as the 'mv' command will fail. | |
175 | # Also, grep fails on NFS mounted directories. | |
176 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then | |
177 | for i in * ; do | |
178 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
179 | if [ -n "${verbose}" ] ; then | |
180 | echo Keeping mpw stuff in $i | |
181 | fi | |
182 | fi | |
183 | done | |
184 | else | |
185 | for i in * ; do | |
186 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
187 | if [ -n "${verbose}" ] ; then | |
188 | echo Removing traces of \"mpw\" from $i... | |
189 | fi | |
190 | cp $i new | |
191 | sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new | |
192 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
193 | if [ -n "${verbose}" ] ; then | |
194 | echo Caching $i in .Recover... | |
195 | fi | |
196 | mv $i .Recover | |
197 | fi | |
198 | mv new $i | |
199 | fi | |
200 | done | |
201 | fi | |
202 | ||
e11b54be PB |
203 | for i in * ; do |
204 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
7b85349f | 205 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 |
e11b54be PB |
206 | fi |
207 | done | |
57d32184 RP |
208 | |
209 | # eof |