Commit | Line | Data |
---|---|---|
1ee1fd7e | 1 | # Sanitize.in for devo. |
1ee1fd7e SC |
2 | # |
3 | ||
4 | # Each directory to survive it's way into a release will need a file | |
5 | # like this one called "./.Sanitize". All keyword lines must exist, | |
6 | # and must exist in the order specified by this file. Each directory | |
7 | # in the tree will be processed, top down, in the following order. | |
8 | ||
9 | # Hash started lines like this one are comments and will be deleted | |
10 | # before anything else is done. Blank lines will also be squashed | |
11 | # out. | |
12 | ||
13 | # The lines between the "Do-first:" line and the "Things-to-keep:" | |
14 | # line are executed as a /bin/sh shell script before anything else is | |
15 | # done in this | |
16 | ||
17 | Do-first: | |
18 | ||
cbc34241 MM |
19 | v850_files="v850.h" |
20 | ||
21 | if ( echo $* | grep keep\-v850 > /dev/null ) ; then | |
22 | keep_these_too="${v850_files} ${keep_these_too}" | |
23 | else | |
24 | lose_these_too="${v850_files} ${lose_these_too}" | |
25 | fi | |
26 | ||
1ee1fd7e SC |
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 | ||
1ee1fd7e | 35 | ChangeLog |
3309648e | 36 | alpha.h |
abb742ac | 37 | arc.h |
1ee1fd7e SC |
38 | common.h |
39 | dwarf.h | |
540cd16f | 40 | dwarf2.h |
1ee1fd7e | 41 | external.h |
ab0453e0 | 42 | hppa.h |
1ee1fd7e | 43 | internal.h |
9582f9ab | 44 | m32r.h |
55d5703f | 45 | mips.h |
b14e6182 | 46 | ppc.h |
688beae5 | 47 | sparc.h |
1ee1fd7e | 48 | |
87756e15 RP |
49 | Things-to-lose: |
50 | ||
1ee1fd7e SC |
51 | Do-last: |
52 | ||
3acdeb5e MH |
53 | d30v_files="ChangeLog common.h" |
54 | if ( echo $* | grep keep\-d30v > /dev/null ) ; then | |
55 | for i in $d30v_files ; do | |
56 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then | |
57 | if [ -n "${verbose}" ] ; then | |
58 | echo Keeping d30v stuff in $i | |
59 | fi | |
60 | fi | |
61 | done | |
62 | else | |
63 | for i in $d30v_files ; do | |
64 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then | |
65 | if [ -n "${verbose}" ] ; then | |
66 | echo Removing traces of \"d30v\" from $i... | |
67 | fi | |
68 | cp $i new | |
69 | sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new | |
70 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
1252987a DE |
71 | if [ -n "${verbose}" ] ; then |
72 | echo Caching $i in .Recover... | |
73 | fi | |
74 | mv $i .Recover | |
75 | fi | |
76 | mv new $i | |
77 | fi | |
78 | done | |
79 | fi | |
80 | ||
6bca117d | 81 | v850_files="ChangeLog common.h" |
01aba636 NC |
82 | if ( echo $* | grep keep\-v850eq > /dev/null ) ; then |
83 | for i in $v850_files ; do | |
84 | if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then | |
85 | if [ -n "${verbose}" ] ; then | |
86 | echo Keeping v850eq stuff in $i | |
87 | fi | |
88 | fi | |
89 | done | |
90 | else | |
91 | for i in $v850_files ; do | |
92 | if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then | |
93 | if [ -n "${verbose}" ] ; then | |
94 | echo Removing traces of \"v850eq\" from $i... | |
95 | fi | |
96 | cp $i new | |
97 | sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new | |
98 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
99 | if [ -n "${verbose}" ] ; then | |
100 | echo Caching $i in .Recover... | |
101 | fi | |
102 | mv $i .Recover | |
103 | fi | |
104 | mv new $i | |
105 | fi | |
106 | done | |
107 | fi | |
108 | if ( echo $* | grep keep\-v850e > /dev/null ) ; then | |
109 | for i in $v850_files ; do | |
110 | if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then | |
111 | if [ -n "${verbose}" ] ; then | |
112 | echo Keeping v850eq stuff in $i | |
113 | fi | |
114 | fi | |
115 | done | |
116 | else | |
117 | for i in $v850_files ; do | |
118 | if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then | |
119 | if [ -n "${verbose}" ] ; then | |
120 | echo Removing traces of \"v850e\" from $i... | |
121 | fi | |
122 | cp $i new | |
123 | sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/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 | |
6bca117d C |
134 | if ( echo $* | grep keep\-v850 > /dev/null ) ; then |
135 | for i in $v850_files ; do | |
136 | if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then | |
137 | if [ -n "${verbose}" ] ; then | |
138 | echo Keeping v850 stuff in $i | |
139 | fi | |
140 | fi | |
141 | done | |
142 | else | |
143 | for i in $v850_files ; do | |
144 | if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then | |
145 | if [ -n "${verbose}" ] ; then | |
146 | echo Removing traces of \"v850\" from $i... | |
147 | fi | |
148 | cp $i new | |
149 | sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new | |
150 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
151 | if [ -n "${verbose}" ] ; then | |
152 | echo Caching $i in .Recover... | |
153 | fi | |
154 | mv $i .Recover | |
155 | fi | |
156 | mv new $i | |
157 | fi | |
158 | done | |
159 | fi | |
160 | ||
dc997928 DE |
161 | for i in * ; do |
162 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
163 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
164 | fi | |
165 | done | |
166 | ||
1ee1fd7e | 167 | # End of file. |