a6e4825793d918b22afb47ce2a0ce188ba6eb122
[external/binutils.git] / gas / .Sanitize
1 # .Sanitize for devo/gas.
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 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
19         keep_these_too="mpw-config.in mpw-make.in ChangeLog.mpw"
20 else
21         lose_these_too="mpw-config.in mpw-make.in ChangeLog.mpw"
22 fi
23
24 # All files listed between the "Things-to-keep:" line and the
25 # "Files-to-sed:" line will be kept.  All other files will be removed.
26 # Directories listed in this section will have their own Sanitize
27 # called.  Directories not listed will be removed in their entirety
28 # with rm -rf.
29
30 Things-to-keep:
31
32 CONTRIBUTORS
33 COPYING
34 ChangeLog
35 Makefile.in
36 NEWS
37 NOTES
38 NOTES.config
39 README
40 README-quirks
41 README-vms
42 README.coff
43 README.rich
44 acconfig.h
45 aclocal.m4
46 app.c
47 as.c
48 as.h
49 atof-generic.c
50 bignum-copy.c
51 bignum.h
52 bit_fix.h
53 cond.c
54 conf.in
55 config
56 config-gas.com
57 configure
58 configure.bat
59 configure.in
60 debug.c
61 doc
62 ecoff.c
63 ecoff.h
64 expr.c
65 expr.h
66 flonum-copy.c
67 flonum-konst.c
68 flonum-mult.c
69 flonum.h
70 frags.c
71 frags.h
72 gasp.c
73 gdbinit.in
74 hash.c
75 hash.h
76 hex-value.c
77 input-file.c
78 input-file.h
79 input-scrub.c
80 link.cmd
81 listing.c
82 listing.h
83 literal.c
84 messages.c
85 obj.h
86 output-file.c
87 output-file.h
88 read.c
89 read.h
90 stabs.c
91 struc-symbol.h
92 subsegs.c
93 subsegs.h
94 symbols.c
95 symbols.h
96 tc.h
97 testsuite
98 vmsconf.sh
99 write.c
100 write.h
101 xmalloc.c
102
103 Things-to-lose:
104
105 Do-last:
106
107 i960xl_files=ChangeLog
108 if ( echo $* | grep keep\-i960xl > /dev/null ) ; then
109         if [ -n "${verbose}" ] ; then
110                 echo Keeping i960xl stuff in $i960xl_files.
111         fi
112 else
113         if [ -n "${verbose}" ]; then
114                 echo -n Cleaning i960xl in `pwd`:
115         fi
116         for f in $i960xl_files ; do
117                 if [ -n "${verbose}" ] ; then
118                         echo -n " " $f
119                 fi
120                 sed '/start\-sanitize\-i960xl/,/end\-sanitize\-i960xl/d' < $f > new
121                 if [ -n "${safe}" ] ; then
122                         mv $f .Recover
123                 fi
124                 mv new $f
125         done
126 fi
127
128 rce_files="configure.in"
129
130 if ( echo $* | grep keep\-rce > /dev/null ) ; then
131         for i in $rce_files ; do
132                 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
133                         if [ -n "${verbose}" ] ; then
134                                 echo Keeping rce stuff in $i
135                         fi
136                 fi
137         done
138 else
139         for i in $rce_files ; do
140                 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
141                         if [ -n "${verbose}" ] ; then
142                                 echo Removing traces of \"rce\" from $i...
143                         fi
144                         cp $i new
145                         sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
146                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
147                                 if [ -n "${verbose}" ] ; then
148                                         echo Caching $i in .Recover...
149                                 fi
150                                 mv $i .Recover
151                         fi
152                         mv new $i
153                 fi
154         done
155 fi
156
157 for i in * ; do
158         if test ! -d $i && (grep sanitize $i > /dev/null) ; then
159                 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
160         fi
161 done
162
163 #
164 # End of file.