sanitize out arc stuff
[binutils-gdb.git] / ld / .Sanitize
1 # .Sanitize for devo/ld.
2
3 # Each directory to survive its 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 directory.
15
16 Do-first:
17
18 mpw_files="mpw-make.in mpw-config.in mpw-em.c ChangeLog.mpw"
19
20 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
21 keep_these_too="${mpw_files} ${keep_these_too}"
22 else
23 lose_these_too="${mpw_files} ${lose_these_too}"
24 fi
25
26 # All files listed between the "Things-to-keep:" line and the
27 # "Files-to-sed:" line will be kept. All other files will be removed.
28 # Directories listed in this section will have their own Sanitize
29 # called. Directories not listed will be removed in their entirety
30 # with rm -rf.
31
32 Things-to-keep:
33
34 ChangeLog
35 Makefile.in
36 NEWS
37 README
38 TODO
39 config
40 config.h
41 configure.bat
42 configure.in
43 dep-in.sed
44 emulparams
45 emultempl
46 genscripts.sh
47 h8-doc.texi
48 ld.1
49 gen-doc.texi
50 ld.h
51 ld.texinfo
52 ldctor.c
53 ldctor.h
54 ldemul.c
55 ldemul.h
56 ldexp.c
57 ldexp.h
58 ldfile.c
59 ldfile.h
60 ldgram.y
61 ldint.texinfo
62 ldlang.c
63 ldlang.h
64 ldlex.h
65 ldlex.l
66 ldmain.c
67 ldmain.h
68 ldmisc.c
69 ldmisc.h
70 ldver.c
71 ldver.h
72 ldwrite.c
73 ldwrite.h
74 lexsup.c
75 mri.c
76 mri.h
77 scripttempl
78 testsuite
79
80 Things-to-lose:
81
82 Do-last:
83
84 echo Looking for traces of \"mpw\"...
85
86 # Don't try to clean directories here, as the 'mv' command will fail.
87 # Also, grep fails on NFS mounted directories.
88 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
89 for i in * ; do
90 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
91 echo Keeping mpw traces in $i
92 fi
93 done
94 else
95 for i in * ; do
96 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
97 echo Removing traces of \"mpw\" out of $i...
98 cp $i new
99 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
100 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
101 echo Caching $i in .Recover...
102 mv $i .Recover
103 fi
104 mv new $i
105 fi
106 done
107 fi
108
109 rce_files="configure.in Makefile.in"
110
111 if ( echo $* | grep keep\-rce > /dev/null ) ; then
112 for i in $rce_files ; do
113 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
114 if [ -n "${verbose}" ] ; then
115 echo Keeping rce stuff in $i
116 fi
117 fi
118 done
119 else
120 for i in $rce_files ; do
121 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
122 if [ -n "${verbose}" ] ; then
123 echo Removing traces of \"rce\" from $i...
124 fi
125 cp $i new
126 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
127 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
128 if [ -n "${verbose}" ] ; then
129 echo Caching $i in .Recover...
130 fi
131 mv $i .Recover
132 fi
133 mv new $i
134 fi
135 done
136 fi
137
138 arc_files="ChangeLog configure.in configure"
139 if ( echo $* | grep keep\-arc > /dev/null ) ; then
140 for i in $arc_files ; do
141 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
142 if [ -n "${verbose}" ] ; then
143 echo Keeping arc stuff in $i
144 fi
145 fi
146 done
147 else
148 for i in $arc_files ; do
149 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
150 if [ -n "${verbose}" ] ; then
151 echo Removing traces of \"arc\" from $i...
152 fi
153 cp $i new
154 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
155 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
156 if [ -n "${verbose}" ] ; then
157 echo Caching $i in .Recover...
158 fi
159 mv $i .Recover
160 fi
161 mv new $i
162 fi
163 done
164 fi
165
166 arc_files="ChangeLog configure.in Makefile.in"
167 if ( echo $* | grep keep\-arc > /dev/null ) ; then
168 for i in $arc_files ; do
169 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
170 if [ -n "${verbose}" ] ; then
171 echo Keeping arc stuff in $i
172 fi
173 fi
174 done
175 else
176 for i in $arc_files ; do
177 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
178 if [ -n "${verbose}" ] ; then
179 echo Removing traces of \"arc\" from $i...
180 fi
181 cp $i new
182 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
183 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
184 if [ -n "${verbose}" ] ; then
185 echo Caching $i in .Recover...
186 fi
187 mv $i .Recover
188 fi
189 mv new $i
190 fi
191 done
192 fi
193
194 for i in * ; do
195 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
196 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
197 fi
198 done
199
200 #
201 # End of file.