]>
Commit | Line | Data |
---|---|---|
30989ea5 | 1 | # .Sanitize for devo/include/opcode. |
1ee1fd7e SC |
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 | ||
30989ea5 DE |
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 | ||
3d1d21b0 MH |
26 | d10v_files="d10v.h" |
27 | ||
28 | if ( echo $* | grep keep\-d10v > /dev/null ) ; then | |
29 | keep_these_too="${d10v_files} ${keep_these_too}" | |
30 | else | |
31 | lose_these_too="${d10v_files} ${lose_these_too}" | |
32 | fi | |
33 | ||
7a3c9336 C |
34 | v850_files="v850.h" |
35 | ||
36 | if ( echo $* | grep keep\-v850 > /dev/null ) ; then | |
37 | keep_these_too="${v850_files} ${keep_these_too}" | |
38 | else | |
39 | lose_these_too="${v850_files} ${lose_these_too}" | |
40 | fi | |
41 | ||
30989ea5 | 42 | |
1ee1fd7e SC |
43 | # All files listed between the "Things-to-keep:" line and the |
44 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
45 | # Directories listed in this section will have their own Sanitize | |
46 | # called. Directories not listed will be removed in their entirety | |
47 | # with rm -rf. | |
48 | ||
49 | Things-to-keep: | |
50 | ||
51 | ChangeLog | |
52 | a29k.h | |
3853da56 | 53 | alpha.h |
1ee1fd7e | 54 | arm.h |
21d9662b | 55 | convex.h |
1ee1fd7e | 56 | h8300.h |
76b731f9 | 57 | hppa.h |
1ee1fd7e SC |
58 | i386.h |
59 | i860.h | |
60 | i960.h | |
61 | m68k.h | |
62 | m88k.h | |
63 | mips.h | |
3072af43 | 64 | mn10x00.h |
1ee1fd7e SC |
65 | np1.h |
66 | ns32k.h | |
67 | pn.h | |
a8146de4 | 68 | ppc.h |
1ee1fd7e SC |
69 | pyr.h |
70 | sparc.h | |
71 | tahoe.h | |
72 | vax.h | |
73 | ||
87756e15 RP |
74 | Things-to-lose: |
75 | ||
1ee1fd7e SC |
76 | Do-last: |
77 | ||
30989ea5 DE |
78 | arc_files="ChangeLog" |
79 | if ( echo $* | grep keep\-arc > /dev/null ) ; then | |
80 | for i in $arc_files ; do | |
81 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
82 | if [ -n "${verbose}" ] ; then | |
83 | echo Keeping arc stuff in $i | |
84 | fi | |
85 | fi | |
86 | done | |
87 | else | |
88 | for i in $arc_files ; do | |
89 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
90 | if [ -n "${verbose}" ] ; then | |
91 | echo Removing traces of \"arc\" from $i... | |
92 | fi | |
93 | cp $i new | |
94 | sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new | |
95 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
96 | if [ -n "${verbose}" ] ; then | |
97 | echo Caching $i in .Recover... | |
98 | fi | |
99 | mv $i .Recover | |
100 | fi | |
101 | mv new $i | |
102 | fi | |
103 | done | |
104 | fi | |
105 | ||
3d1d21b0 MH |
106 | |
107 | d10v_files="ChangeLog" | |
108 | if ( echo $* | grep keep\-d10v > /dev/null ) ; then | |
109 | for i in $d10v_files ; do | |
110 | if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then | |
111 | if [ -n "${verbose}" ] ; then | |
112 | echo Keeping d10v stuff in $i | |
113 | fi | |
114 | fi | |
115 | done | |
116 | else | |
117 | for i in $d10v_files ; do | |
118 | if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then | |
119 | if [ -n "${verbose}" ] ; then | |
120 | echo Removing traces of \"d10v\" from $i... | |
121 | fi | |
122 | cp $i new | |
123 | sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new | |
124 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
125 | if [ -n "${verbose}" ] ; then | |
126 | echo Caching $i in .Recover... | |
127 | fi | |
128 | mv $i .Recover | |
129 | fi | |
130 | mv new $i | |
131 | fi | |
132 | done | |
133 | fi | |
134 | ||
7a3c9336 C |
135 | v850_files="ChangeLog" |
136 | if ( echo $* | grep keep\-v850 > /dev/null ) ; then | |
137 | for i in $v850_files ; do | |
138 | if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then | |
139 | if [ -n "${verbose}" ] ; then | |
140 | echo Keeping v850 stuff in $i | |
141 | fi | |
142 | fi | |
143 | done | |
144 | else | |
145 | for i in $v850_files ; do | |
146 | if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then | |
147 | if [ -n "${verbose}" ] ; then | |
148 | echo Removing traces of \"v850\" from $i... | |
149 | fi | |
150 | cp $i new | |
151 | sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new | |
152 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
153 | if [ -n "${verbose}" ] ; then | |
154 | echo Caching $i in .Recover... | |
155 | fi | |
156 | mv $i .Recover | |
157 | fi | |
158 | mv new $i | |
159 | fi | |
160 | done | |
161 | fi | |
162 | ||
163 | ||
30989ea5 DE |
164 | for i in * ; do |
165 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
166 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
167 | fi | |
168 | done | |
169 | ||
1ee1fd7e | 170 | # End of file. |