Keep igen.
[binutils-gdb.git] / sim / .Sanitize
1 # .Sanitize for devo/sim.
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 d30v_files="d30v igen testsuite"
19 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
20 keep_these_too="${d30v_files} ${keep_these_too}"
21 else
22 lose_these_too="${d30v_files} ${lose_these_too}"
23 fi
24
25 tic80_files="tic80 igen"
26 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
27 keep_these_too="${tic80_files} ${keep_these_too}"
28 else
29 lose_these_too="${tic80_files} ${lose_these_too}"
30 fi
31
32 v850_files="v850"
33 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
34 keep_these_too="${v850_files} ${keep_these_too}"
35 else
36 lose_these_too="${v850_files} ${lose_these_too}"
37 fi
38
39 # All files listed between the "Things-to-keep:" line and the
40 # "Files-to-sed:" line will be kept. All other files will be removed.
41 # Directories listed in this section will have their own Sanitize
42 # called. Directories not listed will be removed in their entirety
43 # with rm -rf.
44
45 Things-to-keep:
46
47 ChangeLog
48 Makefile.in
49 README-HACKING
50 arm
51 configure
52 configure.in
53 common
54 d10v
55 erc32
56 h8300
57 h8500
58 igen
59 m32r
60 mips
61 mn10200
62 mn10300
63 ppc
64 sh
65 w65
66 z8k
67
68 Things-to-lose:
69
70
71 Do-last:
72
73 d30v_files="configure configure.in ChangeLog"
74 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
75 for i in $d30v_files ; do
76 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
77 if [ -n "${verbose}" ] ; then
78 echo Keeping d30v stuff in $i
79 fi
80 fi
81 done
82 else
83 for i in $d30v_files ; do
84 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
85 if [ -n "${verbose}" ] ; then
86 echo Removing traces of \"d30v\" from $i...
87 fi
88 cp $i new
89 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
90 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
91 if [ -n "${verbose}" ] ; then
92 echo Caching $i in .Recover...
93 fi
94 mv $i .Recover
95 fi
96 mv new $i
97 fi
98 done
99 fi
100
101 tic80_files="configure configure.in ChangeLog"
102 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
103 for i in $tic80_files ; do
104 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
105 if [ -n "${verbose}" ] ; then
106 echo Keeping tic80 stuff in $i
107 fi
108 fi
109 done
110 else
111 for i in $tic80_files ; do
112 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
113 if [ -n "${verbose}" ] ; then
114 echo Removing traces of \"tic80\" from $i...
115 fi
116 cp $i new
117 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
118 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
119 if [ -n "${verbose}" ] ; then
120 echo Caching $i in .Recover...
121 fi
122 mv $i .Recover
123 fi
124 mv new $i
125 fi
126 done
127 fi
128
129 v850_files="configure configure.in ChangeLog"
130 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
131 for i in $v850_files ; do
132 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
133 if [ -n "${verbose}" ] ; then
134 echo Keeping v850 stuff in $i
135 fi
136 fi
137 done
138 else
139 for i in $v850_files ; do
140 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
141 if [ -n "${verbose}" ] ; then
142 echo Removing traces of \"v850\" from $i...
143 fi
144 cp $i new
145 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/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 # End of file.