4fb2bdccedd55a49f74bad6fffa7d83c5ba65ac8
[binutils-gdb.git] / include / opcode / .Sanitize
1 # .Sanitize for devo/include/opcode.
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
15
16 Do-first:
17
18 arc_files="arc.h"
19
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21 keep_these_too="${arc_files} ${keep_these_too}"
22 else
23 lose_these_too="${arc_files} ${lose_these_too}"
24 fi
25
26
27 # All files listed between the "Things-to-keep:" line and the
28 # "Files-to-sed:" 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 ChangeLog
36 a29k.h
37 arm.h
38 convex.h
39 h8300.h
40 hppa.h
41 i386.h
42 i860.h
43 i960.h
44 m68k.h
45 m88k.h
46 mips.h
47 np1.h
48 ns32k.h
49 pn.h
50 ppc.h
51 pyr.h
52 sparc.h
53 tahoe.h
54 vax.h
55
56 Things-to-lose:
57
58 Do-last:
59
60 arc_files="ChangeLog"
61 if ( echo $* | grep keep\-arc > /dev/null ) ; then
62 for i in $arc_files ; do
63 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
64 if [ -n "${verbose}" ] ; then
65 echo Keeping arc stuff in $i
66 fi
67 fi
68 done
69 else
70 for i in $arc_files ; do
71 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
72 if [ -n "${verbose}" ] ; then
73 echo Removing traces of \"arc\" from $i...
74 fi
75 cp $i new
76 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
77 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
78 if [ -n "${verbose}" ] ; then
79 echo Caching $i in .Recover...
80 fi
81 mv $i .Recover
82 fi
83 mv new $i
84 fi
85 done
86 fi
87
88 h8s_files="ChangeLog h8300.h"
89 if ( echo $* | grep keep\-h8s > /dev/null ) ; then
90 for i in $h8s_files ; do
91 if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
92 if [ -n "${verbose}" ] ; then
93 echo Keeping h8s stuff in $i
94 fi
95 fi
96 done
97 else
98 for i in $h8s_files ; do
99 if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
100 if [ -n "${verbose}" ] ; then
101 echo Removing traces of \"h8s\" from $i...
102 fi
103 cp $i new
104 sed '/start\-sanitize\-h8s/,/end-\sanitize\-h8s/d' < $i > new
105 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
106 if [ -n "${verbose}" ] ; then
107 echo Caching $i in .Recover...
108 fi
109 mv $i .Recover
110 fi
111 mv new $i
112 fi
113 done
114 fi
115 for i in * ; do
116 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
117 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
118 fi
119 done
120
121 # End of file.