For PR 1927.
[platform/upstream/binutils.git] / bfd / .Sanitize
1 # .Sanitize for devo/bfd.
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\-v9 > /dev/null ) ; then
19         keep_these_too="elf64-sparc.c"
20 else
21         lose_these_too="elf64-sparc.c"
22 fi
23
24 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
25         keep_these_too="mpw-make.in mpw-config.in ChangeLog.mpw ${keep_these_too}"
26 else
27         lose_these_too="mpw-make.in mpw-config.in ChangeLog.mpw ${lose_these_too}"
28 fi
29
30 if ( echo $* | grep keep\-gm > /dev/null ) ; then
31         keep_these_too="ChangeLog.gm ${keep_these_too}"
32 else
33         lose_these_too="ChangeLog.gm ${lose_these_too}"
34 fi
35
36 if ( echo $* | grep keep\-powerpc\-netware > /dev/null ) ; then
37         keep_these_too="nlm32-ppc.c ${keep_these_too}"
38 else
39         lose_these_too="nlm32-ppc.c ${lose_these_too}"
40 fi
41
42 # All files listed between the "Things-to-keep:" line and the
43 # "Files-to-sed:" line will be kept.  All other files will be removed.
44 # Directories listed in this section will have their own Sanitize
45 # called.  Directories not listed will be removed in their entirety
46 # with rm -rf.
47
48 Things-to-keep:
49
50 COPYING
51 ChangeLog
52 ChangeLog.1
53 Makefile.in
54 PORTING
55 TODO
56 VERSION
57 aix386-core.c
58 aout-adobe.c
59 aout-encap.c
60 aout-target.h
61 aout0.c
62 aout32.c
63 aout64.c
64 aoutf1.h
65 aoutx.h
66 archive.c
67 archures.c
68 bfd-in.h
69 bfd-in2.h
70 bfd.c
71 bout.c
72 cache.c
73 cf-i386lynx.c
74 cf-m68klynx.c
75 cf-sparclynx.c
76 cisco-core.c
77 coff-a29k.c
78 coff-alpha.c
79 coff-apollo.c
80 coff-h8300.c
81 coff-h8500.c
82 coff-i386.c
83 coff-i960.c
84 coff-m68k.c
85 coff-m88k.c
86 coff-mips.c
87 coff-rs6000.c
88 coff-sh.c
89 coff-sparc.c
90 coff-u68k.c
91 coff-we32k.c
92 coff-z8k.c
93 coffcode.h
94 coffgen.c
95 coffswap.h
96 config
97 config.bfd
98 configure.bat
99 configure.host
100 configure.in
101 core.c
102 cpu-a29k.c
103 cpu-alpha.c
104 cpu-h8300.c
105 cpu-h8500.c
106 cpu-hppa.c
107 cpu-i386.c
108 cpu-i960.c
109 cpu-m68k.c
110 cpu-m88k.c
111 cpu-mips.c
112 cpu-powerpc.c
113 cpu-rs6000.c
114 cpu-sh.c
115 cpu-sparc.c
116 cpu-vax.c
117 cpu-we32k.c
118 cpu-z8k.c
119 ctor.c
120 demo64.c
121 dep-in.sed
122 doc
123 ecoff.c
124 ecofflink.c
125 ecoffswap.h
126 elf.c
127 elf32-gen.c
128 elf32-hppa.c
129 elf32-hppa.h
130 elf32-i386.c
131 elf32-i860.c
132 elf32-m68k.c
133 elf32-m88k.c
134 elf32-mips.c
135 elf32-ppc.c
136 elf32-sparc.c
137 elf32-target.h
138 elf32.c
139 elf64-gen.c
140 elf64-target.h
141 elf64.c
142 elfcode.h
143 filemode.c
144 format.c
145 gen-aout.c
146 genlink.h
147 hash.c
148 host-aout.c
149 hosts
150 hp300bsd.c
151 hp300hpux.c
152 hppa_stubs.h
153 hppabsd-core.c
154 hpux-core.c
155 i386aout.c
156 i386bsd.c
157 i386dynix.c
158 i386linux.c
159 i386lynx.c
160 i386mach3.c
161 i386os9k.c
162 ieee.c
163 init.c
164 irix-core.c
165 libaout.h
166 libbfd-in.h
167 libbfd.c
168 libbfd.h
169 libcoff-in.h
170 libcoff.h
171 libecoff.h
172 libelf.h
173 libhppa.h
174 libieee.h
175 libnlm.h
176 liboasys.h
177 linker.c
178 lynx-core.c
179 m68klynx.c
180 mipsbsd.c
181 newsos3.c
182 netbsd386.c
183 nlm-target.h
184 nlm.c
185 nlm32-alpha.c
186 nlm32-i386.c
187 nlm32-sparc.c
188 nlm32.c
189 nlm64.c
190 nlmcode.h
191 nlmswap.h
192 oasys.c
193 opncls.c
194 osf-core.c
195 ptrace-core.c
196 reloc.c
197 reloc16.c
198 rs6000-core.c
199 section.c
200 som.c
201 som.h
202 sparclynx.c
203 srec.c
204 stab-syms.c
205 sunos.c
206 syms.c
207 targets.c
208 tekhex.c
209 trad-core.c
210
211 Things-to-lose:
212
213
214 Do-last:
215
216 v9files="configure.in elfcode.h reloc.c bfd-in2.h targets.c config.bfd"
217 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
218         if [ -n "${verbose}" ] ; then
219                 echo Keeping v9 stuff in $v9files.
220         fi
221 else
222         if [ -n "${verbose}" ]; then
223                 echo -n Cleaning v9 in `pwd`:
224         fi
225         for f in $v9files ; do
226                 if [ -n "${verbose}" ] ; then
227                         echo -n " " $f
228                 fi
229                 sed '/start\-sanitize\-v9/,/end\-sanitize\-v9/d' < $f > new
230                 if [ -n "${safe}" ] ; then
231                         mv $f .Recover
232                 fi
233                 mv new $f
234         done
235         chmod a+x config.bfd
236 fi
237
238
239 mpwfiles="coffswap.h"
240 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
241         if [ -n "${verbose}" ] ; then
242                 echo Keeping mpw stuff in $mpwfiles.
243         fi
244 else
245         if [ -n "${verbose}" ]; then
246                 echo -n Cleaning mpw in `pwd`:
247         fi
248         for f in $mpwfiles ; do
249                 if [ -n "${verbose}" ] ; then
250                         echo -n " " $f
251                 fi
252                 sed '/start\-sanitize\-mpw/,/end\-sanitize\-mpw/d' < $f > new
253                 if [ -n "${safe}" ] ; then
254                         mv $f .Recover
255                 fi
256                 mv new $f
257         done
258         chmod a+x config.bfd
259 fi
260
261
262 ppcfiles="ChangeLog Makefile.in configure.in config.bfd targets.c"
263 if ( echo $* | grep keep\-powerpc\-netware > /dev/null ) ; then
264         if [ -n "${verbose}" ] ; then
265                 echo Keeping PowerPC NetWare stuff in $ppcfiles.
266         fi
267 else
268         if [ -n "${verbose}" ]; then
269                 echo -n Removing PowerPC NetWare in `pwd`:
270         fi
271         for f in $ppcfiles ; do
272                 if [ -n "${verbose}" ] ; then
273                         echo -n " " $f
274                 fi
275                 sed '/start\-sanitize\-powerpc\-netware/,/end\-sanitize\-powerpc\-netware/d' < $f > new
276                 if [ -n "${safe}" ] ; then
277                         mv $f .Recover
278                 fi
279                 mv new $f
280         done
281         chmod a+x config.bfd
282 fi
283
284
285 # End of file.