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