added things-to-lose sections
[external/binutils.git] / include / aout / .Sanitize
1
2 # Sanitize.in for devo.
3 # $Id$
4 #
5
6 # Each directory to survive it's way into a release will need a file
7 # like this one called "./.Sanitize".  All keyword lines must exist,
8 # and must exist in the order specified by this file.  Each directory
9 # in the tree will be processed, top down, in the following order.
10
11 # Hash started lines like this one are comments and will be deleted
12 # before anything else is done.  Blank lines will also be squashed
13 # out.
14
15 # The lines between the "Do-first:" line and the "Things-to-keep:"
16 # line are executed as a /bin/sh shell script before anything else is
17 # done in this 
18
19 Do-first:
20
21 # All files listed between the "Things-to-keep:" line and the
22 # "Files-to-sed:" line will be kept.  All other files will be removed.
23 # Directories listed in this section will have their own Sanitize
24 # called.  Directories not listed will be removed in their entirety
25 # with rm -rf.
26
27 Things-to-keep:
28
29 ChangeLog
30 adobe.h
31 aout64.h
32 ar.h
33 encap.h
34 host.h
35 hp.h
36 hp300hpux.h
37 hppa.h
38 ranlib.h
39 reloc.h
40 stab.def
41 stab_gnu.h
42 sun4.h
43
44 Things-to-lose:
45
46 Do-last:
47
48 v9dirty="aout64.h"
49
50 if ( echo $* | egrep verbose > /dev/null ) ; then
51         verbose=true
52 else
53         verbose=
54 fi
55
56
57 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
58         if [ -n "${verbose}" ] ; then
59                 echo Keeping v9 in ${v9dirty}
60         fi
61 else
62         for i in ${v9dirty} ; do
63                 if [ -n "${verbose}" ] ; then
64                         echo Sanitizing v9 in $i
65                 fi
66                 rm -f new
67                 grep -v v9 $i > new
68                 if [ -n "${safe}" ] ; then
69                         mv $i .Recover
70                 else
71                         rm $i
72                 fi
73                 mv new $i
74         done
75 fi
76
77 # End of file.