]>
Commit | Line | Data |
---|---|---|
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 | cygnus_files="release release-info build-all.mk" | |
19 | ||
20 | if ( echo $* | grep keep\-cygnus > /dev/null) ; then | |
21 | keep_these_too="${keep_these_too} ${cygnus_files}" | |
22 | else | |
23 | lose_these_too="${lose_these_too} ${cygnus_files}" | |
24 | fi | |
25 | ||
26 | mpw_files="mpw-README mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw" | |
27 | ||
28 | if ( echo $* | grep keep\-mpw > /dev/null) ; then | |
29 | keep_these_too="${keep_these_too} ${mpw_files}" | |
30 | else | |
31 | lose_these_too="${lose_these_too} ${mpw_files}" | |
32 | fi | |
33 | ||
34 | # All files listed between the "Things-to-keep:" line and the | |
35 | # "Do-last:" line will be kept. All other files will be removed. | |
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 | ||
42 | .cvsignore | |
43 | COPYING | |
44 | COPYING.LIB | |
45 | CYGNUS | |
46 | ChangeLog | |
47 | Makefile.in | |
48 | README | |
49 | autoconf | |
50 | bfd | |
51 | binutils | |
52 | byacc | |
53 | config | |
54 | config.guess | |
55 | config.sub | |
56 | configure | |
57 | configure.in | |
58 | cvs | |
59 | deja-gnu | |
60 | dejagnu | |
61 | diff | |
62 | dosrel | |
63 | dvips | |
64 | emacs | |
65 | emacs19 | |
66 | etc | |
67 | examples | |
68 | expect | |
69 | fileutils | |
70 | flex | |
71 | gas | |
72 | gcc | |
73 | gdb | |
74 | gdbm | |
75 | gdbtest | |
76 | glob | |
77 | gprof | |
78 | grep | |
79 | groff | |
80 | include | |
81 | install.sh | |
82 | ispell | |
83 | ld | |
84 | libg++ | |
85 | libgcc | |
86 | libiberty | |
87 | libio | |
88 | librx | |
89 | m4 | |
90 | make | |
91 | mmalloc | |
92 | move-if-change | |
93 | newlib | |
94 | opcodes | |
95 | pagas | |
96 | patch | |
97 | prms | |
98 | rcs | |
99 | readline | |
100 | sed | |
101 | send-pr | |
102 | shellutils | |
103 | sim | |
104 | tcl | |
105 | textutils | |
106 | tk | |
107 | test-build.mk | |
108 | texinfo | |
109 | tgas | |
110 | utils | |
111 | uudecode | |
112 | wdiff | |
113 | xiberty | |
114 | ||
115 | Things-to-lose: | |
116 | ||
117 | # The lines between the "Do-last:" line and the end of the file | |
118 | # are executed as a /bin/sh shell script after everything else is | |
119 | # done. | |
120 | ||
121 | Do-last: | |
122 | ||
123 | if ( echo $* | egrep verbose > /dev/null ) ; then | |
124 | verbose=true | |
125 | else | |
126 | verbose= | |
127 | fi | |
128 | ||
129 | # Remove "sanitize-Sanitize" lines. | |
130 | if [ -n "${verbose}" ] ; then | |
131 | echo Cleaning unconditional sanitizations out of Makefile.in... | |
132 | fi | |
133 | cp Makefile.in new | |
134 | sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new | |
135 | if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then | |
136 | mv Makefile.in .Recover | |
137 | fi | |
138 | mv new Makefile.in | |
139 | ||
140 | if [ -n "${verbose}" ] ; then | |
141 | echo Thawing away the \"chill\"... | |
142 | fi | |
143 | ||
144 | # Don't try to clean directories here, as the 'mv' command will fail. | |
145 | # Also, grep fails on NFS mounted directories. | |
146 | if ( echo $* | grep keep\-chill > /dev/null ) ; then | |
147 | for i in * ; do | |
148 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
149 | if [ -n "${verbose}" ] ; then | |
150 | echo Keeping chill stuff in $i | |
151 | fi | |
152 | fi | |
153 | done | |
154 | else | |
155 | for i in * ; do | |
156 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
157 | if [ -n "${verbose}" ] ; then | |
158 | echo Thawing the \"chill\" out of $i... | |
159 | fi | |
160 | cp $i new | |
161 | sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new | |
162 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
163 | if [ -n "${verbose}" ] ; then | |
164 | echo Caching $i in .Recover... | |
165 | fi | |
166 | mv $i .Recover | |
167 | fi | |
168 | mv new $i | |
169 | fi | |
170 | done | |
171 | fi | |
172 | ||
173 | if [ -n "${verbose}" ] ; then | |
174 | echo Removing traces of \"mpw\"... | |
175 | fi | |
176 | ||
177 | # Don't try to clean directories here, as the 'mv' command will fail. | |
178 | # Also, grep fails on NFS mounted directories. | |
179 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then | |
180 | for i in * ; do | |
181 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
182 | if [ -n "${verbose}" ] ; then | |
183 | echo Keeping mpw stuff in $i | |
184 | fi | |
185 | fi | |
186 | done | |
187 | else | |
188 | for i in * ; do | |
189 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
190 | if [ -n "${verbose}" ] ; then | |
191 | echo Removing traces of \"mpw\" from $i... | |
192 | fi | |
193 | cp $i new | |
194 | sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new | |
195 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
196 | if [ -n "${verbose}" ] ; then | |
197 | echo Caching $i in .Recover... | |
198 | fi | |
199 | mv $i .Recover | |
200 | fi | |
201 | mv new $i | |
202 | fi | |
203 | done | |
204 | fi | |
205 | ||
206 | for i in * ; do | |
207 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
208 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
209 | fi | |
210 | done | |
211 | ||
212 | # eof |