* .Sanitize: Keep emacs19 around.
[platform/upstream/binutils.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 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 m4
89 make
90 mmalloc
91 move-if-change
92 newlib
93 opcodes
94 pagas
95 patch
96 prms
97 rcs
98 readline
99 sed
100 send-pr
101 shellutils
102 sim
103 tcl
104 textutils
105 tk
106 test-build.mk
107 texinfo
108 tgas
109 utils
110 uudecode
111 wdiff
112 xiberty
113
114 Things-to-lose:
115
116 # The lines between the "Do-last:" line and the end of the file
117 # are executed as a /bin/sh shell script after everything else is
118 # done.
119
120 Do-last:
121
122 if ( echo $* | egrep verbose > /dev/null ) ; then
123         verbose=true
124 else
125         verbose=
126 fi
127
128 # Remove "sanitize-Sanitize" lines.
129 if [ -n "${verbose}" ] ; then
130         echo Cleaning unconditional sanitizations out of Makefile.in...
131 fi
132 cp Makefile.in new
133 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
134 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
135         mv Makefile.in .Recover
136 fi
137 mv new Makefile.in
138
139 if [ -n "${verbose}" ] ; then
140         echo Thawing away the \"chill\"...
141 fi
142
143 # Don't try to clean directories here, as the 'mv' command will fail.
144 # Also, grep fails on NFS mounted directories.
145 if ( echo $* | grep keep\-chill > /dev/null ) ; then
146         for i in * ; do
147                 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
148                         if [ -n "${verbose}" ] ; then
149                                 echo Keeping chill stuff in $i
150                         fi
151                 fi
152         done
153 else
154         for i in * ; do
155                 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
156                         if [ -n "${verbose}" ] ; then
157                                 echo Thawing the \"chill\" out of $i...
158                         fi
159                         cp $i new
160                         sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
161                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
162                                 if [ -n "${verbose}" ] ; then
163                                         echo Caching $i in .Recover...
164                                 fi
165                                 mv $i .Recover
166                         fi
167                         mv new $i
168                 fi
169         done
170 fi
171
172 if [ -n "${verbose}" ] ; then
173         echo Removing traces of \"mpw\"...
174 fi
175
176 # Don't try to clean directories here, as the 'mv' command will fail.
177 # Also, grep fails on NFS mounted directories.
178 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
179         for i in * ; do
180                 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
181                         if [ -n "${verbose}" ] ; then
182                                 echo Keeping mpw stuff in $i
183                         fi
184                 fi
185         done
186 else
187         for i in * ; do
188                 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
189                         if [ -n "${verbose}" ] ; then
190                                 echo Removing traces of \"mpw\" from $i...
191                         fi
192                         cp $i new
193                         sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
194                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
195                                 if [ -n "${verbose}" ] ; then
196                                         echo Caching $i in .Recover...
197                                 fi
198                                 mv $i .Recover
199                         fi
200                         mv new $i
201                 fi
202         done
203 fi
204
205 for i in * ; do
206         if test ! -d $i && (grep sanitize $i > /dev/null) ; then
207                 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
208         fi
209 done
210
211 # eof