note name change of cdtest-bar.cc
[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 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
19 keep_these_too=""
20 fi
21
22 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
23 keep_these_too="mpw-config.in mpw-make.in ChangeLog.mpw ${keep_these_too}"
24 else
25 lose_these_too="mpw-config.in mpw-make.in ChangeLog.mpw ${lose_these_too}"
26 fi
27
28 if ( echo $* | grep keep\-gm > /dev/null ) ; then
29 keep_these_too="mpw-xconfig.in mpw-em.c ChangeLog.gm ${keep_these_too}"
30 else
31 lose_these_too="mpw-xconfig.in mpw-em.c ChangeLog.gm ${lose_these_too}"
32 fi
33
34 # All files listed between the "Things-to-keep:" line and the
35 # "Files-to-sed:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
38 # with rm -rf.
39
40 Things-to-keep:
41
42 ChangeLog
43 Makefile.in
44 NEWS
45 README
46 TODO
47 cdtest-foo.cc
48 cdtest-foo.h
49 cdtest-bar.cc
50 cdtest-main.cc
51 cdtest.exp
52 config
53 config.h
54 configure.bat
55 configure.in
56 dep-in.sed
57 emulparams
58 emultempl
59 genscripts.sh
60 h8-doc.texi
61 ld.1
62 gen-doc.texi
63 ld.h
64 ld.texinfo
65 ldctor.c
66 ldctor.h
67 ldemul.c
68 ldemul.h
69 ldexp.c
70 ldexp.h
71 ldfile.c
72 ldfile.h
73 ldgram.y
74 ldint.texinfo
75 ldlang.c
76 ldlang.h
77 ldlex.h
78 ldlex.l
79 ldmain.c
80 ldmain.h
81 ldmisc.c
82 ldmisc.h
83 ldver.c
84 ldver.h
85 ldwrite.c
86 ldwrite.h
87 lexsup.c
88 mri.c
89 mri.h
90 scripttempl
91 testsuite
92
93 Things-to-lose:
94
95 Do-last:
96
97 echo Looking for signs of \"v9\"...
98
99 # Don't try to clean directories here, as the 'mv' command will fail.
100 # Also, grep fails on NFS mounted directories.
101 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
102 for i in * ; do
103 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
104 echo Keeping v9 stuff in $i
105 fi
106 done
107 else
108 for i in * ; do
109 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
110 echo Cleaning the \"v9\" out of $i...
111 cp $i new
112 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
113 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
114 echo Caching $i in .Recover...
115 mv $i .Recover
116 fi
117 mv new $i
118 fi
119 done
120 fi
121
122 echo Looking for traces of \"mpw\"...
123
124 # Don't try to clean directories here, as the 'mv' command will fail.
125 # Also, grep fails on NFS mounted directories.
126 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
127 for i in * ; do
128 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
129 echo Keeping mpw traces in $i
130 fi
131 done
132 else
133 for i in * ; do
134 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
135 echo Removing traces of \"mpw\" out of $i...
136 cp $i new
137 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
138 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
139 echo Caching $i in .Recover...
140 mv $i .Recover
141 fi
142 mv new $i
143 fi
144 done
145 fi
146
147 echo Looking for PowerPC NetWare...
148 ppcfiles="configure.in"
149 if ( echo $* | grep keep\-powerpc\-netware > /dev/null ) ; then
150 if [ -n "${verbose}" ] ; then
151 echo Keeping PowerPC NetWare stuff in $ppcfiles.
152 fi
153 else
154 if [ -n "${verbose}" ]; then
155 echo -n Removing PowerPC NetWare in `pwd`:
156 fi
157 for f in $ppcfiles ; do
158 if [ -n "${verbose}" ] ; then
159 echo -n " " $f
160 fi
161 sed '/start\-sanitize\-powerpc\-netware/,/end\-sanitize\-powerpc\-netware/d' < $f > new
162 if [ -n "${safe}" ] ; then
163 mv $f .Recover
164 fi
165 mv new $f
166 done
167 fi
168
169 # End of file.